From fef5ec874bf463ea5b1df830fd0740c4c413b6c2 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 4 Apr 2020 08:27:16 +0900 Subject: [PATCH] enhance(server): Log error message when internal error occured --- src/server/api/call.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/api/call.ts b/src/server/api/call.ts index 7911eb9b4..d50b6a122 100644 --- a/src/server/api/call.ts +++ b/src/server/api/call.ts @@ -77,7 +77,7 @@ export default async (endpoint: string, user: User | null | undefined, token: Ac if (e instanceof ApiError) { throw e; } else { - apiLogger.error(`Internal error occurred in ${ep.name}`, { + apiLogger.error(`Internal error occurred in ${ep.name}: ${e?.message}`, { ep: ep.name, ps: data, e: {