UNPKG

simple-lambda-client

Version:

A simple, convenient way to invoke aws lambda functions with best practices.

23 lines 972 B
"use strict"; /* eslint-disable max-classes-per-file */ Object.defineProperty(exports, "__esModule", { value: true }); exports.LambdaInvocationError = exports.UnsuccessfulStatusCodeError = void 0; class UnsuccessfulStatusCodeError extends Error { constructor({ code, payload }) { const message = `Status code does not indicate success: ${code}; ${JSON.stringify(payload)}`; super(message); } } exports.UnsuccessfulStatusCodeError = UnsuccessfulStatusCodeError; class LambdaInvocationError extends Error { constructor({ lambda, response, event, }) { const message = `An error was returned as the lambda invocation response for the lambda '${lambda}': "${response.errorMessage}". See error properties for more details.`; super(message); this.lambda = lambda; this.response = response; this.event = event; } } exports.LambdaInvocationError = LambdaInvocationError; //# sourceMappingURL=errors.js.map