export default class BunziiError extends Response { constructor(message: string, status: number) { super(message, { status, headers: { "Content-Type": "text/html" } }); } static throw(message: string | null, stack: any, status: number) { let body; let trace; switch (status) { case 500: { body = `
Error (${status})
An error occurred while processing the request.
${message}
Show Stack Trace
` break; } default: { body = `
Error (${status})
${message}
Go back to home
` } } const text = ` Bunzii ${body} ` return new BunziiError(text, status); } }