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

Use common base class for all exceptions thrown by jwt-cpp #215

Open
sirzooro opened this issue Feb 28, 2022 · 1 comment · May be fixed by #252
Open

Use common base class for all exceptions thrown by jwt-cpp #215

sirzooro opened this issue Feb 28, 2022 · 1 comment · May be fixed by #252
Milestone

Comments

@sirzooro
Copy link
Contributor

This was initially described in #212. Please add new class derived from std::system_error, and derive all jwt-cpp exceptions from it. This would allow to write bigger block of code, and at the end add few catch sections for different kinds of errors (e.g. network error, jwt validation error, etc.). You also could store some extra information in additional fields of exception class, e.g. name of claim which did not pass validation.

Desktop:

  • OS: RedHat 8
  • Compiler g++ 10.3.1
  • Version jwt-cpp v0.6.0
@Thalhammer Thalhammer changed the title [bug] Use new common base class for all exceptions thrown by jwt-cpp [Enhancement] Use common base class for all exceptions thrown by jwt-cpp Feb 28, 2022
@prince-chrismc prince-chrismc added this to the 0.7.0 milestone Mar 12, 2022
@prince-chrismc prince-chrismc changed the title [Enhancement] Use common base class for all exceptions thrown by jwt-cpp Use common base class for all exceptions thrown by jwt-cpp Mar 14, 2022
@prince-chrismc prince-chrismc modified the milestones: 0.7.0, 0.8.0 Oct 10, 2022
@prince-chrismc
Copy link
Collaborator

prince-chrismc commented Dec 11, 2023

Extra bit for this is some of the algo families added latter on mix other algo error codes #318 (comment)

more possible work in this direction #318 (review)

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

Successfully merging a pull request may close this issue.

3 participants