New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@flytio/int-error-helper

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flytio/int-error-helper

Use this package to make good and actionable error messages for your ordering integration.

  • 0.1.0
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Error helper for integrations

Use this package to make good and actionable error messages for your ordering integration.

What is an actionable error message?

An error message should contain as much information as possible to help who sees the error to take an action to promptly fix it.

A bad error message, for example, is the following:

There was an unknown error sending the order to the POS.

While a good one is, for example:

There is an invalid item in the payload, please contact the menu team to confirm the PLUs are correct. POS Error message: [-956234774] Invalid database object detected: 1234

This message is composed by three parts:

  1. A text explaining the error occurred
  2. Who needs to be contacted to investigate / fix the problem
  3. The original POS message

With a well defined error message like the above one, who spots the error knows immediately what the problem is and how to act in order to fix it.

Why using an npm module for that?

We decided to create a module in order to unify the error messages returned by the various integrations. We want, for example, that the error messages for an invalid tender type will be the same across all the integrations.

When I should use this module?

You should use this module in every integration. What you need to do on your integration is investigating on the error response returned from the POS and call this module methods that will create the error messages for you, with no hassle required to make sure they are the same all across the integrations.

Usage

Install

// Get back on this when the package is published on npm

How to use in in your integration

// Get back on this when the package is published on npm

Extending the error messages with a custom one

// Get back on this when the package is published on npm

Keywords

FAQs

Package last updated on 13 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc