feat: Preparation des modèles Settings pour l'enregistrement SMTP [#17]

This commit is contained in:
Luc SORIGNET
2025-05-05 09:25:07 +02:00
parent 99a882a64a
commit eda6f587fb
33 changed files with 468 additions and 74 deletions

View File

@ -7,6 +7,7 @@ import {
} from '@/utils/Url';
import { CURRENT_YEAR_FILTER } from '@/utils/constants';
import { useNotification } from '@/context/NotificationContext';
const requestResponseHandler = async (response) => {
const body = await response.json();
@ -16,6 +17,7 @@ const requestResponseHandler = async (response) => {
// Throw an error with the JSON body containing the form errors
const error = new Error(body?.errorMessage || 'Une erreur est survenue');
error.details = body;
showNotification('Une erreur inattendue est survenue.', 'error', 'Erreur');
throw error;
};