🥅(frontend) improve add member form error handling

- translate known errors, including already existing
group error, and directly display the other ones
- add component tests
- update translations
- add parseAPIError, a reusable function to
catch errors on the whole frontend app

Closes issue #293

♻️(frontend) improve general error catching

- change parseAPIError to make it reusable on all
requests
- update components depending on it
This commit is contained in:
daproclaima
2024-09-10 15:01:36 +02:00
committed by Sebastien Nobour
parent 3d7dfa019c
commit ee5a785d43
11 changed files with 455 additions and 274 deletions

View File

@@ -108,7 +108,9 @@ test.describe('Teams Create', () => {
await page.getByRole('button', { name: 'Create the team' }).click();
await expect(
page.getByText('Team with this Slug already exists.'),
page.getByText(
'This name is already used for another group. Please enter another one.',
),
).toBeVisible();
});