mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-31 12:12:28 +08:00
chore(lint): fix no-explicit-any in export.ts
This commit is contained in:
parent
7feb38ffa1
commit
04f3b637f9
@ -37,11 +37,11 @@ function exportBranch(req: Request, res: Response) {
|
||||
} else {
|
||||
throw new NotFoundError(`Unrecognized export format '${format}'`);
|
||||
}
|
||||
} catch (e: any) {
|
||||
const message = `Export failed with following error: '${e.message}'. More details might be in the logs.`;
|
||||
} catch (e: unknown) {
|
||||
const message = `Export failed with following error: '${(e instanceof Error) ? e.message : e}'. More details might be in the logs.`;
|
||||
taskContext.reportError(message);
|
||||
|
||||
log.error(message + e.stack);
|
||||
log.error((e instanceof Error) ? message + e.stack : message);
|
||||
|
||||
res.setHeader("Content-Type", "text/plain").status(500).send(message);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user