From 771f011506bc98b0577fb80fffa287d1c85bd032 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Mar 2019 08:27:30 +0900 Subject: [PATCH] Better log --- src/server/api/call.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server/api/call.ts b/src/server/api/call.ts index 4b3d4cfbe3..dac57b8f75 100644 --- a/src/server/api/call.ts +++ b/src/server/api/call.ts @@ -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,