Wrapped additional error data under data

This commit is contained in:
Jori Lallo
2018-03-07 00:00:58 -08:00
parent f5c1ddf8b9
commit 983b8fe9a0
5 changed files with 8 additions and 6 deletions

View File

@ -55,7 +55,7 @@ api.use(async (ctx, next) => {
error: _.snakeCase(err.id || error),
status: err.status,
message,
adminEmail: err.adminEmail ? err.adminEmail : undefined,
data: err.errorData ? err.errorData : undefined,
};
}
});