Skip to content

feat: classify oversized-upload 413s - #56

Merged
Tr00d merged 1 commit into
masterfrom
oversized-uploads
Aug 4, 2026
Merged

feat: classify oversized-upload 413s#56
Tr00d merged 1 commit into
masterfrom
oversized-uploads

Conversation

@Tr00d

@Tr00d Tr00d commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

A storage request rejected for exceeding the gateway's request-size limit surfaced correctly as a SupabaseStorageException but was left Reason.Unknown, with no hint at a way forward.

Add FailureHint.Reason.EntityTooLarge and map HTTP 413 to it, with the enum value's doc and on both Upload overloads pointing callers at the resumable UploadOrResume. Cover it with a unit test (413 => EntityTooLarge) and a contract test asserting an oversized upload against a 413 text/html body surfaces StatusCode 413 / EntityTooLarge rather than crashing JSON parsing. Also completes the XML documentation for the FailureHint type, clearing its CS1591 debt.

Relates to #14

A storage request rejected for exceeding the gateway's request-size
limit surfaced correctly as a SupabaseStorageException but was left
Reason.Unknown, with no hint at a way forward.

Add FailureHint.Reason.EntityTooLarge and map HTTP 413 to it, with the
enum value's doc and <remarks> on both Upload overloads pointing callers
at the resumable UploadOrResume. Cover it with a unit test (413 =>
EntityTooLarge) and a contract test asserting an oversized upload against
a 413 text/html body surfaces StatusCode 413 / EntityTooLarge rather than
crashing JSON parsing. Also completes the XML documentation for the
FailureHint type, clearing its CS1591 debt.

Relates to #14
@Tr00d
Tr00d merged commit 724f46d into master Aug 4, 2026
1 of 2 checks passed
@Tr00d
Tr00d deleted the oversized-uploads branch August 4, 2026 08:55
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.

1 participant