Better log

This commit is contained in:
syuilo 2019-03-03 08:27:30 +09:00
parent 826865869a
commit 771f011506
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -75,7 +75,11 @@ export default async (endpoint: string, user: IUser, app: IApp, data: any, file?
if (e instanceof ApiError) {
throw e;
} else {
apiLogger.error(e);
apiLogger.error(`Internal error occurred in ${ep.name}`, {
ep: ep.name,
ps: data,
e: e
});
throw new ApiError(null, {
e: {
message: e.message,