Uniform way to send errors for lapin, removing nesting, and concatenating error codes


002.0.15 years ago6 years agoMinified + gzip package size for @sinet/lapin-send-error in KB


Lapin Send Error

Version npm Build Status Dependency Status devDependency Status

Error handling for Lapin calls. Handles fail returns without nesting, concatenates error codes.


npm install @sinet/lapin-send-error --save


If you receive an error from a database query or remote lapin call easily handle it with:

const sendError = require( '@sinet/lapin-send-error' );

if ( error ) {
    return sendError( send, error, 'code' );

The first parameter is the send object from Lapin.


All pull requests must follow coding conventions and standards.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.