0.0.9 • Published 5 years ago
@rapharacing/lambda-utils v0.0.9
Lambda Utils
Installation
yarn add @rapharacing/lambda-utils
How to use
import * as utils from "@rapharacing/lambda-utils";
import {
errorResponse,
cognitoErrorResponse,
requestConfig,
formatAuthorizationToken,
} from "@rapharacing/lambda-utils";License
Design tokens are freely distributable under the terms of the MIT license.
API
Table of Contents
errorResponse
Returns a Error Object
Parameters
errorObject Error response from AWS or CCcustomKeystring Custom error key to overwrite stack errorscustomMessagestring Custom error message to overwrite stack errors
Returns Object Error
cognitoErrorResponse
Returns a Error key
Parameters
errorObject Error response from AWS or CCcustomMessagestring Custom error message to overwrite stack errors
Returns string Error key
requestConfig
Returns a configuration object for axios
Parameters
dataObject Data to be sent as the request bodydata.urldata.methoddata.tokendata.data
Returns Object Configuration object
formatAuthorizationToken
Format Authorization Token
Parameters
tokenstring Token
Returns string Token