It could be the scope breaking it

This commit is contained in:
Tim Robinson 2015-09-18 11:02:50 +00:00
parent 267ae6e3f4
commit 0d8fbef5d6

View File

@ -125,6 +125,7 @@ function plugin(options, imports, register) {
} catch (e) {
console.error("Cannot send error as JSON: ", error);
error.message = "Unspecified error";
error.scope = null;
}
res.json({ error: error }, null, statusCode);
// plain text