fix(Auth): Error type in json payload

This commit is contained in:
Berkeley Martinez
2018-01-01 15:39:14 -08:00
committed by mrugesh mohapatra
parent e1c5b8a894
commit a1530c041a
3 changed files with 24 additions and 9 deletions

View File

@@ -89,6 +89,7 @@ export default function prodErrorHandler() {
} else if (type === 'json') {
res.setHeader('Content-Type', 'application/json');
return res.send({
type: handled.type || 'errors',
message
});
// plain text