[v13] Improve error messaging when creating or updating resources fails#39397
Merged
rosstimothy merged 1 commit intobranch/v13from Mar 15, 2024
Merged
[v13] Improve error messaging when creating or updating resources fails#39397rosstimothy merged 1 commit intobranch/v13from
rosstimothy merged 1 commit intobranch/v13from
Conversation
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`.
probakowski
approved these changes
Mar 15, 2024
r0mant
approved these changes
Mar 15, 2024
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.
Backport #39379 to branch/v13
changelog: improve error messaging when creating resources fails because they already exist or updating resources fails because they were removed