Skip to content

Conversation

@DonutEspresso
Copy link
Member

Implement these two methods for better stand alone formatting (see restify/node-restify#952).

Also fixes some inconsistencies in the stringified output with regards to having 'Error' at the end of the code.

@DonutEspresso
Copy link
Member Author

code property now has a value of 'Error' for HttpError and RestError. Any subclass will have the name of the error, minus 'Error', i.e., GatewayTimeoutError has a code of GatewayTimeout. All code and restCode properties are now overridable.

If all looks good, let's get this merged.

lib/index.js Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should check for capital or lowercase Error

@micahr
Copy link
Contributor

micahr commented Jan 7, 2016

LGTM :shipit:

@DonutEspresso DonutEspresso force-pushed the tostring branch 2 times, most recently from 6fc775f to 5fb8e0f Compare January 8, 2016 20:17
@DonutEspresso
Copy link
Member Author

Addressed comments - final pass and I'll get it merged. @yunong FYI

@DonutEspresso
Copy link
Member Author

Gonna merge this sometime today, I think this will require a major rev due to changes in the code and restCode properties.

- add toJSON and toString methods
- rev nsp. allow nsp to output success message
- update travis build targets
- normalize all code and restCode properties
DonutEspresso added a commit that referenced this pull request Feb 4, 2016
@DonutEspresso DonutEspresso merged commit 306b542 into master Feb 4, 2016
@DonutEspresso DonutEspresso deleted the tostring branch February 4, 2016 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants