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

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