New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

express-http-errors-json

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-http-errors-json

Easy access to HTTP errors for Express

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

express-http-errors-json

Easy access to HTTP errors for Express

Installation

$ npm install --save express-http-errors-json

Usage

This package exposes some commonly used abstracted HTTP errors to be returned along with short messages in JSON format. Mainly useful for JSON APIs.

import { BadRequest } from 'express-http-errors-json';

router.get('/', (req, res) => {
	BadRequest(res, 'The received request was invalid');
});

Exposed functions

Function nameHTTP Code
BadRequest400
Unauthenticated401
Forbidden403
NotFound404
TooManyRequests429
ServerError500
BadGateway502
ServiceUnavailable503

About

License

Copyright © 2018, nukeop. Released under the Affero GPL 3.0 License.

Keywords

express

FAQs

Package last updated on 13 Dec 2018

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