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

[Backport release/3.2.x] fix(dbless): drain error table when flattening errors #10575

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

team-gateway-bot
Copy link
Collaborator

Backport c550c11 from #10256.

* fix(dbless): drain error table when flattening errors

This only affect `POST /config?flatten_errors=1`.

When nested errors are flattened for the response body, they should
be removed from the original error table so that they are not
included in the final `fields` error object. Errors that are not
flattened should remain.

It could be argued that this is a backwards-incompatible change, but:

1. This is opt-in only via the `flatten_errors` query param.
2. It's arguably a behavioral fix since we are effectively
   de-duplicating the errors in the response.
3. This makes the response object much, much cleaner.

* docs(changelog): update for #10256

(cherry picked from commit c550c11)
Copy link
Contributor

@flrgh flrgh left a comment

Choose a reason for hiding this comment

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

tests are 🟢 and the change set is 1-1 with the original PR (#10256)

@flrgh flrgh merged commit e7db0b8 into release/3.2.x Mar 28, 2023
@flrgh flrgh deleted the backport-10256-to-release/3.2.x branch March 28, 2023 21:00
@outsinre
Copy link
Contributor

outsinre commented Apr 3, 2023

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