Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Client(s) should handle oversized payloads gracefully #476

Closed
ashleymichal opened this issue Aug 27, 2019 · 8 comments
Closed

Client(s) should handle oversized payloads gracefully #476

ashleymichal opened this issue Aug 27, 2019 · 8 comments
Assignees
Labels
feature Feature requests and suggestions
Milestone

Comments

@ashleymichal
Copy link
Contributor

See cloudflare/cloudflare-rs#32

TL;DR - especially in places where large payloads are expected, Wrangler should check that the total request payload is <100MB, and/or handle the 413 response from the API, by notifying the user that they are trying to upload a too-large payload.

@xtuc
Copy link
Member

xtuc commented Aug 28, 2019

The worker can be fairly big and we warn about it arround ~1Mb. I don't see a case where the payload would exceed 100Mb.

@ashleymichal
Copy link
Contributor Author

ashleymichal commented Sep 3, 2019 via email

@gabbifish gabbifish added this to the Add KV Subcommands milestone Sep 3, 2019
@gabbifish
Copy link
Contributor

We already have 413 error support in the feat-kv-commands branch. I started a PoC of a payload size check, but I'm not sure if we want to mirror API functionality by adding this check to cloudflare-rs; after all, the API Gateway returns a 413 very quickly (it checks payload size even before the request is forwarded to the KV API Service behind the Gateway).

I think that for now, we can potentially close this issue. I'm weary of implementing duplicate logic on top of the KV API and API Gateway--this is something that could cause technical debt down the line whenever the API or the API Gateway change.

@ashleymichal
Copy link
Contributor Author

ashleymichal commented Sep 3, 2019

it might still be wise to do in Wrangler if only for bucket upload (see #499 )

@xtuc
Copy link
Member

xtuc commented Sep 4, 2019

Got it now, it's specific for single or batch of KV object upload.

@ashleymichal
Copy link
Contributor Author

going to move to the kv additions milestone

@gabbifish
Copy link
Contributor

I think #499 has superseded this ticket; shall we close this? @ashleymichal

@ashleymichal
Copy link
Contributor Author

yes, we can close this. thanks @gabbifish

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Feature requests and suggestions
Projects
None yet
Development

No branches or pull requests

3 participants