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

Add typed error handling #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add typed error handling #29

wants to merge 2 commits into from

Conversation

typerandom
Copy link
Contributor

@typerandom typerandom commented Oct 1, 2016

Fixes so that all errors are typed and documented.

How to verify

Read the docs, checkout this branch and test it with the code below:

var nJwt = require('njwt');

try {
    nJwt.create();
} catch (err) {
    if (err instanceof nJwt.SigningKeyRequiredJwtError) {
        return console.log('Signing key required!');
    }
    console.log('Unhandled error!', err);
}

Fixes #22

@coveralls
Copy link

coveralls commented Oct 1, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 5904561 on fix-error-handling into 9e177c3 on master.

@coveralls
Copy link

coveralls commented Oct 1, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 60cb403 on fix-error-handling into 9e177c3 on master.

@coveralls
Copy link

coveralls commented Oct 1, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 60cb403 on fix-error-handling into 9e177c3 on master.

@coveralls
Copy link

coveralls commented Oct 14, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 1fd51b4 on fix-error-handling into 9e177c3 on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants