Skip to content

feat(error): handle 422 errors from the API#1198

Open
EtienneM wants to merge 3 commits intomasterfrom
fix/1155/env-set_error_message
Open

feat(error): handle 422 errors from the API#1198
EtienneM wants to merge 3 commits intomasterfrom
fix/1155/env-set_error_message

Conversation

@EtienneM
Copy link
Member

@EtienneM EtienneM commented Mar 5, 2026

Here is the output:

 blscalingo --app biniou env-set PORT=12345
 !     422 Unprocessable Content
* PORT → Name is reserved

Fix #1155

  • Add a changelog entry in the section "To Be Released" of CHANGELOG.md

@EtienneM EtienneM self-assigned this Mar 5, 2026
@EtienneM EtienneM force-pushed the fix/1155/env-set_error_message branch 2 times, most recently from 29dd774 to 066847b Compare March 6, 2026 08:41
@EtienneM EtienneM changed the title fix(error): correctly parse in case of RequestFailedError feat(error): handle 422 errors from the API Mar 6, 2026
@EtienneM EtienneM force-pushed the fix/1155/env-set_error_message branch from 066847b to ab25894 Compare March 6, 2026 08:55
@EtienneM EtienneM force-pushed the fix/1155/env-set_error_message branch from ab25894 to 517dea8 Compare March 6, 2026 08:57
@EtienneM EtienneM force-pushed the fix/1155/env-set_error_message branch from 517dea8 to 5ef41c0 Compare March 6, 2026 09:06
newReportError(currentUser, err).Report()
rollbar.Wait()

rootError := rootCause(err)
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed rootCause that is useless with go-utils/errors/v3. I should have adapted this code in #1196

@EtienneM EtienneM marked this pull request as ready for review March 6, 2026 09:44
@EtienneM EtienneM requested review from a team and briceamen and removed request for a team March 6, 2026 09:44
Copy link
Contributor

@briceamen briceamen left a comment

Choose a reason for hiding this comment

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

Very clean, LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

env-set does not properly display the error message when setting a reserved variable

2 participants