Compare commits

..

No commits in common. "6df86a1925fb3e26483c13751b85a39a2957bd43" and "988e07f869e5a7756b73680c15506b22d1bd8628" have entirely different histories.

4 changed files with 4 additions and 10 deletions

View file

@ -3,8 +3,8 @@
declare global { declare global {
namespace App { namespace App {
export interface Error { export interface Error {
status: number;
message: string; message: string;
errorId: string;
} }
// interface Locals {} // interface Locals {}
// interface PageData {} // interface PageData {}

View file

@ -1,10 +1,7 @@
export async function handleError({ error, event, status, message }) { export async function handleError({ error, event, status, message }) {
const errorId = crypto.randomUUID();
console.error(error) console.error(error)
// console.error(event)
// console.error(status)
return { return {
errorId, status,
message message
}; };
} }

View file

@ -8,12 +8,9 @@ export async function handleFetch({ request, fetch }) {
} }
export async function handleError({ error, event, status, message }) { export async function handleError({ error, event, status, message }) {
const errorId = crypto.randomUUID();
console.error(error) console.error(error)
// console.error(event)
// console.error(status)
return { return {
errorId, status,
message message
}; };
} }

View file

@ -5,7 +5,7 @@
<div id='container'> <div id='container'>
<div class="wrapper"> <div class="wrapper">
<p id="status">{$page.status}</p> <p id="status">{$page.status}</p>
<p id="message">{$page.error?.message}</p> <p id="message">{$page.error.message}</p>
</div> </div>
</div> </div>