Skip to content

Conversation

@Bewi
Copy link
Contributor

@Bewi Bewi commented Sep 24, 2025

Display error message provided by the API in snackbar

Related JIRA tickets : IA-4502

Self proofreading checklist

  • Did I use eslint and ruff formatters?
  • Is my code clear enough and well documented?
  • Are my typescript files well typed?
  • New translations have been added or updated if new strings have been introduced in the frontend
  • My migrations file are included
  • Are there enough tests?
  • Documentation has been included (for new feature)

Doc

Tell us where the doc can be found (docs folder, wiki, in the code...).

Changes

Added a flag on useSnackbarMutation to display error message returned by the API if any.

How to test

Make sure nothing is broken :D

Print screen / video

Upload here print screens or videos showing the changes.

Notes

Things that the reviewers should know:

  • known bugs that are out of the scope of the PR
  • other trade-offs that were made
  • does the PR depends on a PR in bluesquare-components?
  • should the PR be merged into another PR?

Follow the Conventional Commits specification

The merge message of a pull request must follow the Conventional Commits specification.

This convention helps to automatically generate release notes.

Use lowercase for consistency.

Example:

fix: empty instance pop up

Refs: IA-3665

Note that the Jira reference is preceded by a line break.

Both the line break and the Jira reference are entered in the Add an optional extended description… field.

}
};

const getApiErrorMessage = (error: any) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a DjangoError type no ? @quang-le

@Bewi Bewi force-pushed the IA-4502-show-api-error-translated-message-in-snackbar branch from 8bd77eb to b068150 Compare October 14, 2025 07:16
@beygorghor beygorghor added the postrelease Should be merged just after the release label Oct 20, 2025
@tdethier tdethier merged commit add45e0 into develop Oct 22, 2025
3 checks passed
@tdethier tdethier deleted the IA-4502-show-api-error-translated-message-in-snackbar branch October 22, 2025 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

postrelease Should be merged just after the release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants