Add handler for client and server errors

This commit is contained in:
Alessio Davoli 2023-12-22 12:44:08 +01:00
parent fbad879acb
commit a37f8a3f29
2 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,5 @@
export async function handleError({ error, event, status, message }) {
return {
message
};
}

View file

@ -2,3 +2,9 @@ export async function handle({ event, resolve }) {
const response = await resolve(event);
return response;
}
export async function handleError({ error, event, status, message }) {
return {
message
};
}