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