mirror of
https://github.com/zadam/trilium.git
synced 2025-12-22 08:09:55 +01:00
chore(lint): fix no-explicit-any in export.ts
This commit is contained in:
@@ -37,11 +37,11 @@ function exportBranch(req: Request, res: Response) {
|
|||||||
} else {
|
} else {
|
||||||
throw new NotFoundError(`Unrecognized export format '${format}'`);
|
throw new NotFoundError(`Unrecognized export format '${format}'`);
|
||||||
}
|
}
|
||||||
} catch (e: any) {
|
} catch (e: unknown) {
|
||||||
const message = `Export failed with following error: '${e.message}'. More details might be in the logs.`;
|
const message = `Export failed with following error: '${(e instanceof Error) ? e.message : e}'. More details might be in the logs.`;
|
||||||
taskContext.reportError(message);
|
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);
|
res.setHeader("Content-Type", "text/plain").status(500).send(message);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user