Socket
Socket
Sign inDemoInstall

@c8/errors

Package Overview
Dependencies
Maintainers
6
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@c8/errors - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

4

lib/utils.js

@@ -39,4 +39,8 @@ 'use strict'

// Make err.data publicly available so we can send extra intel like custom error codes.
// err.data can be filled in the last parameter of any Boom function.
boomError.output.payload.params = boomError.data
return boomError
}
}

2

package.json
{
"name": "@c8/errors",
"version": "0.0.3",
"version": "0.0.4",
"description": "Common errors and their utils used by C8 management",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,2 +0,19 @@

# errors
Common error type in our applications
# @c8/errors
Common error type in our components
## Usage
- `npm i --save @c8/errors`
- ```javascript
const Errors = require('@c8/errors')
// You will typically be fine just keeping the default mapping
let boomErr = Errors.utils.toBoom(err)
// But you can also specify the second parameter of toBoom() if I don't like the default mapping
let boomErr = Errors.utils.toBoom(err, {
entityTooLarge: ['FileTooLargeError'],
unsupportedMediaType: ['TypeError']
})
```
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