Lambda Utils
npm install @rapharacing/lambda-utilsyarn add @rapharacing/lambda-utils
``js
import * as utils from "@rapharacing/lambda-utils";
import {
errorResponse,
cognitoErrorResponse,
requestConfig,
formatAuthorizationToken,
} from "@rapharacing/lambda-utils";
`
Design tokens are freely distributable under the terms of the MIT license.
[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: https://github.com/moment/moment/blob/develop/LICENSE
- errorResponse
- Parameters
- cognitoErrorResponse
- Parameters
- requestConfig
- Parameters
- formatAuthorizationToken
- Parameters
Returns a Error Object
- error Object Error response from AWS or CCcustomKey
- string Custom error key to overwrite stack errorscustomMessage
- string Custom error message to overwrite stack errors
Returns Object Error
Returns a Error key
- error Object Error response from AWS or CCcustomMessage
- string Custom error message to overwrite stack errors
Returns string Error key
Returns a configuration object for axios
- data Object Data to be sent as the request bodydata.url
- data.method
- data.token
- data.data
-
Returns Object Configuration object
Format Authorization Token
- token` string Token
Returns string Token