Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redink-errors

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redink-errors

Module to handle Redink errors

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

redink-errors

Module to handle Redink errors

CircleCI codecov

Installation

Install node.js Then:

$ npm install --save redink-errors

Overview

Redink error modules

Once you have imported the Redink error classes, all you have to do is throw your constructed error.

Example server error:

import { RedinkError, RedinkDatabaseError } from 'redink-errors';

const throwError = (variable) => {
  if (variable === 0) {
    throw new RedinkError('Cannot divide by 0');
  }

  return 10 / variable;
}

Example http error:

import { RedinkHttpError } from 'redink-errors';

const throwHttpError = (variable) => {
  if (variable === 0) {
    throw new RedinkHttpError(404, 'Cannot divide by 0');
  }

  return 10 / variable;
}

Keywords

FAQs

Package last updated on 21 Jul 2016

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