@rapharacing/lambda-utils
v0.0.9
Published
Lambda Utils
Downloads
2
Readme
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
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
cognitoErrorResponse
Returns a Error key
Parameters
error
Object Error response from AWS or CCcustomMessage
string Custom error message to overwrite stack errors
Returns string Error key
requestConfig
Returns a configuration object for axios
Parameters
data
Object Data to be sent as the request bodydata.url
data.method
data.token
data.data
Returns Object Configuration object
formatAuthorizationToken
Format Authorization Token
Parameters
token
string Token
Returns string Token