Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v13] Improve error messaging when creating or updating resources fails #39397

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

rosstimothy
Copy link
Contributor

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

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`.
@rosstimothy rosstimothy added this pull request to the merge queue Mar 15, 2024
Merged via the queue into branch/v13 with commit 29b21a6 Mar 15, 2024
24 checks passed
@rosstimothy rosstimothy deleted the bot/backport-39379-branch/v13 branch March 15, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants