mirror of
https://github.com/zadam/trilium.git
synced 2025-11-18 03:00:41 +01:00
Fix returned status when content is not found.
This commit is contained in:
@@ -21,7 +21,7 @@ export function createPartialContentHandler(contentProvider: ContentProvider, lo
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.debug("ContentProvider threw exception: ", error);
|
logger.debug("ContentProvider threw exception: ", error);
|
||||||
if (error instanceof ContentDoesNotExistError) {
|
if (error instanceof ContentDoesNotExistError) {
|
||||||
return res.status(400).send(error.message);
|
return res.status(404).send(error.message);
|
||||||
}
|
}
|
||||||
return res.sendStatus(500);
|
return res.sendStatus(500);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user