hapijs / bounce Goto Github PK
View Code? Open in Web Editor NEWSelective error catching and rewrite rules
License: Other
Selective error catching and rewrite rules
License: Other
Is it possible to transpile this library to ES5?
as of 5ca0439 the minimal required node version is 8.12. I assume this change was made in error, as the commit message is "misc"? Otherwise this is a breaking change – e.g. all users of AWS Lambda are still using node 8.10, so upgrading is not an option for everyone.
EDIT: this is also related to hapijs/boom#207
EDIT2: This is an issue as I'm using yarn
as my package manager and commands like yarn install
, yarn add
, etc. fail with this version of bounce.
I'd prefer if this package would keep the engines version at >=8.0.0
, so that if I try to install it with node v6 I receive an error, but with node v8.10 I am ok.
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet.
We recommend using:
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
I'm trying to understand better how to use @hapi/bounce
by trying to read the linked articles from API.md which no longer exist:
For more information read:
- [Learning to Throw Again](https://medium.com/@eranhammer/learning-to-throw-again-79b498504d28)
- [Catching without Awaiting](https://medium.com/@eranhammer/catching-without-awaiting-b2cb7df45790)
vanhornj@vanhornj-mbp ~ $ cd $(mktemp -d) && nvm use 8.9 && npm install bounce && node -r bounce
Now using node v8.9.0 (npm v5.5.1)
npm WARN saveError ENOENT: no such file or directory, open '/private/var/folders/34/7qv8nblx5m3_17ljjll3t24cchyzd2/T/tmp.EYGlUDLw/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/private/var/folders/34/7qv8nblx5m3_17ljjll3t24cchyzd2/T/tmp.EYGlUDLw/package.json'
npm WARN tmp.EYGlUDLw No description
npm WARN tmp.EYGlUDLw No repository field.
npm WARN tmp.EYGlUDLw No README data
npm WARN tmp.EYGlUDLw No license field.
+ [email protected]
added 1 package in 0.581s
module.js:538
throw err;
^
Error: Cannot find module 'hoek'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/private/var/folders/34/7qv8nblx5m3_17ljjll3t24cchyzd2/T/tmp.EYGlUDLw/node_modules/bounce/lib/index.js:7:14)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
I feel like I'm missing something. I'd be happy to submit PR if not.
I recently came upon a use case for .ignore:
try {
await test.case();
}
catch (err) {
bounce.ignore(err, { message : 'nope' });
return;
}
But I ended up not using it as I didn't deem it clear enough for anyone not super familiar with Bounce what will happen there.
The accompanying slack discussion: https://hapihour.slack.com/archives/C6BMHNBLM/p1602682096074500
There were suggestion for
Bounce.rethrowUnless()
or Bounce.except()
which I liked
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.