enhance(server): Log error message when internal error occured

This commit is contained in:
syuilo 2020-04-04 08:27:16 +09:00
parent f2e347fec1
commit fef5ec874b

View File

@ -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: {