Update web-page handler: add more detailed error logs
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ export default async function handleWebPages({ req, }) {
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
log.error(`Error Handling Web Page: ${error.message}`);
|
||||
log.error(`Error Handling Web Page: ${error.message}`, error);
|
||||
const componentRes = await grabPageErrorComponent({
|
||||
error,
|
||||
});
|
||||
|
||||
Vendored
+1
-1
@@ -5,7 +5,7 @@ declare const bunext: {
|
||||
bunextLog: {
|
||||
info: (msg: string, log?: any) => void;
|
||||
success: (msg: string, log?: any) => void;
|
||||
error: (msg: string | Error) => void;
|
||||
error: (msg: string | Error, log?: any) => void;
|
||||
warn: (msg: string) => void;
|
||||
build: (msg: string) => void;
|
||||
watch: (msg: string) => void;
|
||||
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
export declare const log: {
|
||||
info: (msg: string, log?: any) => void;
|
||||
success: (msg: string, log?: any) => void;
|
||||
error: (msg: string | Error) => void;
|
||||
error: (msg: string | Error, log?: any) => void;
|
||||
warn: (msg: string) => void;
|
||||
build: (msg: string) => void;
|
||||
watch: (msg: string) => void;
|
||||
|
||||
Vendored
+1
-1
@@ -15,7 +15,7 @@ export const log = {
|
||||
success: (msg, log) => {
|
||||
console.log(`${prefix.success} ${chalk.green(msg)}`, log || "");
|
||||
},
|
||||
error: (msg) => console.error(`${prefix.error} ${chalk.red(String(msg))}`),
|
||||
error: (msg, log) => console.error(`${prefix.error} ${chalk.red(String(msg))}`, log || ""),
|
||||
warn: (msg) => console.warn(`${prefix.warn} ${chalk.yellow(msg)}`),
|
||||
build: (msg) => console.log(`${prefix.build} ${chalk.magenta(msg)}`),
|
||||
watch: (msg) => console.log(`${prefix.watch} ${chalk.blue(msg)}`),
|
||||
|
||||
Reference in New Issue
Block a user