Skip to content

Commit

Permalink
Add back default error message (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Aug 21, 2018
1 parent e67dedf commit dfe5c68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/errors/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const debug = require('debug')('feathers-errors');

function FeathersError (msg, name, code, className, data) {
msg = msg || 'Error';

let errors;
let message;
let newData;
Expand Down
1 change: 1 addition & 0 deletions packages/errors/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ describe('feathers-errors', () => {
var error = new errors.GeneralError();
assert.equal(error.code, 500);
assert.equal(error.className, 'general-error');
assert.equal(error.message, 'Error');
assert.notEqual(error.stack, undefined);
assert.equal(error instanceof errors.GeneralError, true);
assert.equal(error instanceof errors.FeathersError, true);
Expand Down

0 comments on commit dfe5c68

Please sign in to comment.