diff --git a/server/utils/resources.ts b/server/utils/resources.ts index 89dbd95..5f1116b 100644 --- a/server/utils/resources.ts +++ b/server/utils/resources.ts @@ -314,7 +314,7 @@ export function handleJSON(handler: () => Promise): RequestH return (request, response) => { handler() .then(data => success(response, data || {})) - .catch(error => error(response, error)); + .catch(e => error(response, e)); }; } @@ -322,6 +322,6 @@ export function handleJSONWithData(handler: (data: RequestData) => Pro return (request, response) => { handler(getData(request)) .then(data => success(response, data || {})) - .catch(error => error(response, error)); + .catch(e => error(response, e)); }; }