UNPKG

lambda-service-client

Version:

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

23 lines 968 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LambdaInvocationError = exports.UnsuccessfulStatusCodeError = void 0; // tslint:disable max-classes-per-file 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