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

Gabbi/improve bulk error handling #466

Merged
merged 7 commits into from
Aug 27, 2019

Conversation

gabbifish
Copy link
Contributor

This PR closes #465.

This PR also adds logic for handling and displaying HTTP status codes indicative of an error. This is especially useful when the API gateway returns errors before the request ever makes it to the KV API; for example, prior to this PR, uploads of payload > 100MB would silently error because wrangler looked for a KV api response that didn't exist. Instead, we should make sure wrangler handles cases like this and points out relevant information like Err code 413--payload too large.

@gabbifish gabbifish changed the base branch from master to feat-kv-commands August 22, 2019 21:23
@@ -61,6 +63,15 @@ fn print_error(e: ApiFailure) {
}
}

// For handling cases where the API gateway returns errors via HTTP status codes
// (no KV error code is given).
fn give_status_code_context(status_code: StatusCode) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this should probably eventually be pulled up and out bc the same issue would come up on any request to any api endpoint; however there's no use doing that now.

@gabbifish gabbifish merged commit 7c27abb into feat-kv-commands Aug 27, 2019
@gabbifish gabbifish deleted the gabbi/improve-bulk-error-handling branch August 27, 2019 15:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants