u
This commit is contained in:
@@ -70,10 +70,17 @@ function wrapStoreWithTiming(rawStore) {
|
||||
storeLog.debug(`${namespace}.${method} ${chalk.gray(`(${Date.now() - start}ms)`)}`);
|
||||
return result;
|
||||
} catch (err) {
|
||||
storeLog.error(
|
||||
`${namespace}.${method} ${chalk.red('FAILED')} ` +
|
||||
`${chalk.gray(`(${Date.now() - start}ms)`)} ${chalk.red(err.message)}`
|
||||
);
|
||||
const isNotFound = /not found/i.test(err?.message);
|
||||
if (isNotFound) {
|
||||
storeLog.debug(
|
||||
`${namespace}.${method} ${chalk.gray(`(${Date.now() - start}ms)`)} ${chalk.gray(err.message)}`
|
||||
);
|
||||
} else {
|
||||
storeLog.error(
|
||||
`${namespace}.${method} ${chalk.red('FAILED')} ` +
|
||||
`${chalk.gray(`(${Date.now() - start}ms)`)} ${chalk.red(err.message)}`
|
||||
);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user