0.0.9 • Published 5 years ago

@rapharacing/lambda-utils v0.0.9

Weekly downloads
9
License
MIT
Repository
-
Last release
5 years ago

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 CC
  • customKey string Custom error key to overwrite stack errors
  • customMessage string Custom error message to overwrite stack errors

Returns Object Error

cognitoErrorResponse

Returns a Error key

Parameters

  • error Object Error response from AWS or CC
  • customMessage 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 body
    • data.url
    • data.method
    • data.token
    • data.data

Returns Object Configuration object

formatAuthorizationToken

Format Authorization Token

Parameters

Returns string Token

0.0.9

5 years ago

0.0.8

5 years ago

0.0.6

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago