Improve error messaging when creating or updating resources fails#39379
Merged
rosstimothy merged 1 commit intomasterfrom Mar 15, 2024
Merged
Improve error messaging when creating or updating resources fails#39379rosstimothy merged 1 commit intomasterfrom
rosstimothy merged 1 commit intomasterfrom
Conversation
r0mant
approved these changes
Mar 15, 2024
There have been a few support questions raised recently about very
confusing error messages similar to the following:
```
RespMetadata: {
StatusCode: 400,
RequestID: "FVRLJR89DF3H16H4NS9I2SM6R7VV4KQNSO5AEMVJF66Q9ASUAAJG"
},
Message_: "The conditional request failed"
}, failed to create db <db>
ConditionalCheckFailedException: The conditional request failed
```
This error is returned because a resource that already exists is
trying to be created again, and when DynamoDB detects this it
returns a ConditionalCheckFailedException. Instead of returning
these confusing error messages directly to users we can intercept
them and provide a clearer message.
Apps, Databases, Desktops and KubernetesClusters have all been
updated to catch AlreadyExists errors on Create and NotFound errors
on Update and alter the message returned to something similar to
`resource "foo" does not exist` or `resource "foo" already exists`.
659fdac to
d9985fb
Compare
probakowski
approved these changes
Mar 15, 2024
|
@rosstimothy See the table below for backport results.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There have been a few support questions raised recently about very confusing error messages similar to the following:
This error is returned because a resource that already exists is trying to be created again, and when DynamoDB detects this it returns a ConditionalCheckFailedException. Instead of returning these confusing error messages directly to users we can intercept them and provide a clearer message.
Apps, Databases, Desktops and KubernetesClusters have all been updated to catch AlreadyExists errors on Create and NotFound errors on Update and alter the message returned to something similar to
resource "foo" does not existorresource "foo" already exists.Changelog: improve error messaging when creating resources fails because they already exist or updating resources fails because they were removed