You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just followed the example code about creating a status with image in this repo and ran it using Bun, but the error suddenly occurred even though the image url was valid.
984 | throw new MastoUnexpectedError("The server returned data with an unknown encoding. The server may be down.");
985 | }
986 | const data = this.serializer.deserialize(encoding, yield error.text());
987 | const { error: message, errorDescription, details } = data, additionalProperties = __rest(data, ["error", "errorDescription", "details"]);
988 | return new MastoHttpError({
989 | statusCode: error.status,
^
MastoHttpError: Validation failed: File can't be blank
cause: {}
The text was updated successfully, but these errors were encountered:
@AozoraDev Hi, thank you for reporting an issue. I'm wishing to extend the support for non-Node.js platforms, but since I don't catch up with Bun, it's a really good experience.
Can you try this code as well? I changed fs.readFileSync to Bun-native Bun.file API and wrapped it by Blob.
I locally verified this works, but this is still strange as BunFile should be compatible with Blob. Let me take some time to look into this issue (though this could be a bug from either Mastodon/Bun).
Yeah it works but somehow there's an error in the vs code.
Type 'Blob' is not assignable to type 'string | Blob'.
Type 'Blob' is missing the following properties from type 'Blob': json, formDatats(2322)
index.d.ts(3837, 14): The expected type comes from property 'file' which is declared here on type 'CreateMediaAttachmentParams'
I just followed the example code about creating a status with image in this repo and ran it using Bun, but the error suddenly occurred even though the image url was valid.
The text was updated successfully, but these errors were encountered: