Socket
Socket
Sign inDemoInstall

@feathersjs/errors

Package Overview
Dependencies
Maintainers
4
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@feathersjs/errors - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

11

CHANGELOG.md
# Change Log
## [v3.1.0](https://github.com/feathersjs/errors/tree/v3.1.0) (2017-11-18)
[Full Changelog](https://github.com/feathersjs/errors/compare/v3.0.0...v3.1.0)
**Closed issues:**
- feature: allow for mixed files/functions for error-handler options [\#91](https://github.com/feathersjs/errors/issues/91)
**Merged pull requests:**
- 91 allow mixed config [\#94](https://github.com/feathersjs/errors/pull/94) ([DesignByOnyx](https://github.com/DesignByOnyx))
## [v3.0.0](https://github.com/feathersjs/errors/tree/v3.0.0) (2017-11-01)

@@ -4,0 +15,0 @@ [Full Changelog](https://github.com/feathersjs/errors/compare/v3.0.0-pre.1...v3.0.0)

10

lib/error-handler.js

@@ -5,3 +5,4 @@ const path = require('path');

const defaults = {
public: path.resolve(__dirname, 'public')
public: path.resolve(__dirname, 'public'),
logger: console
};

@@ -26,2 +27,7 @@ const defaultHtmlError = path.resolve(defaults.public, 'default.html');

return function (error, req, res, next) {
// Log the error if it didn't come from a service method call
if (options.logger && typeof options.logger.error === 'function' && !res.hook) {
options.logger.error(error);
}
if (error.type !== 'FeathersError') {

@@ -96,3 +102,3 @@ let oldError = error;

} else if (options.html && (contentType.indexOf('html') !== -1 || accepts.indexOf('html') !== -1)) {
return formatter['text/html'](error, req, res, next);
formatter['text/html'](error, req, res, next);
} else {

@@ -99,0 +105,0 @@ // TODO (EK): Maybe just return plain text

2

package.json
{
"name": "@feathersjs/errors",
"description": "Common error types for feathers apps",
"version": "3.1.0",
"version": "3.2.0",
"homepage": "https://github.com/feathersjs/errors",

@@ -6,0 +6,0 @@ "main": "lib/index",

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