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 message to thrown Fido2VerificationException #10

Closed
abergs opened this issue Aug 12, 2018 · 6 comments
Closed

Add message to thrown Fido2VerificationException #10

abergs opened this issue Aug 12, 2018 · 6 comments
Labels
good first issue Good for newcomers

Comments

@abergs
Copy link
Collaborator

abergs commented Aug 12, 2018

To help debugging/reporting

@abergs abergs added the good first issue Good for newcomers label Aug 12, 2018
@aseigler
Copy link
Collaborator

We should probably come up with a standard exception message format for the whole project and adhere to that.

@abergs
Copy link
Collaborator Author

abergs commented Aug 24, 2018

Yes. I think that message standard should include the expected and supplied value, similiar to unit testing exceptions: "Type was invalid. Expected 'create' but was 'something else'

@aseigler
Copy link
Collaborator

All thrown exceptions currently have messages now, but have different formats.

@abergs
Copy link
Collaborator Author

abergs commented Aug 31, 2018

Let's rewrite them where possible per my suggestion above. Pattern:
"{COMPLAINT/MESSAGE}. Expected 'X' but was 'Y'

The expected but was should only be added "where it makes sense".

For null values we might as well throw:
"'A' was null. Expected string but was null".

I can write a new constructor which formats it this way.

@iamcarbon
Copy link
Sponsor Contributor

@abergs I think we made good progress on the error messages over the last 4 years. The messages are pretty good now! Can we close this issue?

@abergs
Copy link
Collaborator Author

abergs commented Nov 28, 2022

We have indeed @iamcarbon

@abergs abergs closed this as completed Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants
@iamcarbon @abergs @aseigler and others