mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
refactor: gestion des erreurs
This commit is contained in:
@ -11,7 +11,7 @@ const requestResponseHandler = async (response) => {
|
||||
return body;
|
||||
}
|
||||
// Throw an error with the JSON body containing the form errors
|
||||
const error = new Error('Form submission error');
|
||||
const error = new Error(body?.errorMessage || "Une erreur est survenue");
|
||||
error.details = body;
|
||||
throw error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user