Skip to content

fix(storage): throw a SupabaseStorageException for a non-JSON 2xx body - #460

Closed
fresh55 wants to merge 1 commit into
supabase:masterfrom
fresh55:fix/storage-non-json-success-body
Closed

fresh55 wants to merge 1 commit into
supabase:masterfrom
fresh55:fix/storage-non-json-success-body

Conversation

@fresh55

@fresh55 fresh55 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

a 2xx body that isn't JSON, like a proxy's html error page, now throws a SupabaseStorageException instead of a JsonException, same as storage-js. its message is the parse error, not the body, since storage responses can carry signed urls. storage side of #260, fixed for postgrest in #459.

@Tr00d Tr00d left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would wait on this one, depending on what happens with #460
The reason is we're duplicating the logic from ParseJsonBody between packages, under Helpers.cs
If this is meant to be reused, we should probably move it to Core instead. The only difference is the target exception, which we can delegate with a function

@fresh55

fresh55 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

closing this for now, the storage fix will come with the shared helper refactor after #459

@fresh55 fresh55 closed this Oct 2, 2026
@fresh55
fresh55 deleted the fix/storage-non-json-success-body branch October 7, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants