Skip to content

Build your personal knowledge base with Trilium Notes

Fix returned status when content is not found.

SukantGujar0e03c8348aed
diff --git a/src/createPartialContentHandler.ts b/src/createPartialContentHandler.ts
index 2bbbe64c16..5e6d6a3b24 100644
--- a/src/createPartialContentHandler.ts
+++ b/src/createPartialContentHandler.ts
@@ -21,7 +21,7 @@ export function createPartialContentHandler(contentProvider: ContentProvider, lo
} catch (error) {
logger.debug("ContentProvider threw exception: ", error);
if (error instanceof ContentDoesNotExistError) {
- return res.status(400).send(error.message);
+ return res.status(404).send(error.message);
}
return res.sendStatus(500);
}