Skip to content

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

Merged
rosstimothy merged 1 commit intobranch/v13from
bot/backport-39379-branch/v13
Mar 15, 2024
Merged

[v13] Improve error messaging when creating or updating resources fails#39397
rosstimothy merged 1 commit intobranch/v13from
bot/backport-39379-branch/v13

Conversation

@rosstimothy
Copy link
Copy Markdown
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
@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