@rapharacing/lambda-utils

0.0.9 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @rapharacing/lambda-utils

Weekly Downloads

1

Version

0.0.9

License

MIT

Unpacked Size

18.2 kB

Total Files

8

Last publish

Collaborators

  • john.kilpatrick
  • bbodien
  • alex-windett
  • jakubgajewski
  • michaela_w