Fix returned status when content is not found.

This commit is contained in:
SukantGujar 2019-03-12 18:28:57 +05:30
parent 1ab683b1e7
commit 0e03c8348a

View File

@ -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);
}