From bd792d76617c4570acecc67de0dd6a7fe732c57c Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 22 Feb 2019 13:39:06 +0900 Subject: [PATCH] Fix type annotation --- src/server/api/call.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/api/call.ts b/src/server/api/call.ts index 46efc24bc..106f0937b 100644 --- a/src/server/api/call.ts +++ b/src/server/api/call.ts @@ -68,7 +68,7 @@ export default async (endpoint: string, user: IUser, app: IApp, data: any, file? } // API invoking - return await ep.exec(data, user, app, file).catch(e => { + return await ep.exec(data, user, app, file).catch((e: Error) => { if (e instanceof ApiError) { throw e; } else { @@ -76,7 +76,7 @@ export default async (endpoint: string, user: IUser, app: IApp, data: any, file? throw new ApiError(null, { e: { message: e.message, - code: e.code, + code: e.name, stack: e.stack } });