Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to use nested VError for error handling #8

Open
dmitrizagidulin opened this issue Jun 30, 2018 · 4 comments
Open

Refactor to use nested VError for error handling #8

dmitrizagidulin opened this issue Jun 30, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@dmitrizagidulin
Copy link
Contributor

Enhance the error handling mechanism to use embedded causal chains of VErrors (see this excellent Joyent blog post on Error Handling in Node.js) and the corresponding https://github.com/joyent/node-verror library.

Also, consider using the Boom package for HTTP error handling (though size is a concern - check to see how much weight these libs will add to the Webpack'd bundle).

@dmitrizagidulin
Copy link
Contributor Author

Hmm, maybe not. Including verror adds 43kb to the bundled lib. Worth it on the server side, but definitely not on the browser side.

@dmitrizagidulin
Copy link
Contributor Author

On the other hand, the excellent standard-http-error lib only adds 2kb, so consider a nested chain of those, instead.

@dmitrizagidulin
Copy link
Contributor Author

Whoa. And boom adds 300kb to the Webpack'd bundle! Definitely server-side-only.

@RubenVerborgh RubenVerborgh added the enhancement New feature or request label Aug 24, 2018
@jonassmedegaard
Copy link

looking at the larger stack for solid-server, I notice that standard-http-error even if not big is used only in this library.

Just skimming names it seems http-errors is the module generally used. If I guess correctly that it provides equivalent functionality then perhaps it makes sense to instead refactor to use that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants