UNPKG

@upv/ushi-shared

Version:

Shared DTOs, types, and utilities for the USHI platform (LMS, Trials, Social, Wallet).

17 lines (16 loc) 499 B
"use strict"; // src/utils/wrapHandler.ts Object.defineProperty(exports, "__esModule", { value: true }); exports.wrapHandler = void 0; const errorHelpers_1 = require("../api/responses/errorHelpers"); const wrapHandler = (handler) => { return async (event) => { try { return await handler(event); } catch (err) { return (0, errorHelpers_1.internalError)(err, 'Unhandled exception in Lambda'); } }; }; exports.wrapHandler = wrapHandler;