@rapharacing/error-handler

1.3.3 • Public • Published

Rapha Error Handler

pipeline status coverage report tested with jest

MIT License

Transform and translated error messages for client-side applications and middlware.

Features

  • Babel - Write next generation JavaScript today.
  • Jest - JavaScript testing framework used by Facebook.
  • ESLint - Make sure you are writing a quality code.
  • Prettier - Enforces a consistent style by parsing your code and re-printing it.
  • Travis CI - Automate tests and linting for every push or pull request.
  • Documentation - A documentation system so good, you'll actually write documentation.
  • Standard Version - Automate versioning and CHANGELOG generation.

API

Table of Contents

getError

Returns a transformed and translated error message for the FE or MW. These can be further tailored for Customer service by passing an optional param

Parameters

Returns String Translated error message string

import getError from "@rapharacing/error-handler";

const error = getError("AccessDeniedException", "en");

Commands

$ yarn test # run tests with Jest
$ yarn coverage # run tests with coverage and open it on browser
$ yarn lint # lint code
$ yarn docs # generate docs
$ yarn build # generate docs and transpile code

Readme

Keywords

Package Sidebar

Install

npm i @rapharacing/error-handler

Weekly Downloads

2

Version

1.3.3

License

MIT

Unpacked Size

74 kB

Total Files

22

Last publish

Collaborators

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