-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
@accounts/error : new AccountsError package with message formatting #171
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used to have optional login info on the Accounts Error to allow for audit logs in the future..
We never got to this future so I tend to approve removing this parts and add it later if needed..
packages/error/package.json
Outdated
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/js-accounts/accounts/tree/master/packages/server" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad, will be fixed in the next minutes
@Aetherall is there a way to get 100% test coverage for the error package in oder to not loose |
Actually the coverage missing comes from if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = (new Error(message)).stack;
} It would be a string comparison of something that is not predictable EDIT : Or I can do a !null comparison EDIT 2 : I am having bad time trying to cover |
Can I merge This ? |
You will need to prettier before I think and let's wait for @davidyaha review |
just figure out the tests but that is good to go IMO |
This is a first implementation of the AccountsError package.
As the error code and login info is not used yet, I removed the code concerning them so we can implement it accordingly with the current state