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

Make OAuthError extend GenericError #638

Merged
merged 4 commits into from Oct 31, 2023
Merged

Make OAuthError extend GenericError #638

merged 4 commits into from Oct 31, 2023

Conversation

frederikprijck
Copy link
Member

@frederikprijck frederikprijck commented Oct 31, 2023

Description

For consistency, this PR makes OAuthError extend GenericError, which still extends Error.

References

#636

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

@frederikprijck frederikprijck requested a review from a team as a code owner October 31, 2023 08:43
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 08:43 — with GitHub Actions Inactive
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 08:43 — with GitHub Actions Inactive
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 08:43 — with GitHub Actions Inactive
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 08:43 — with GitHub Actions Inactive
super(error_description || error);
export class OAuthError extends GenericError {
constructor(public error: string, public error_description: string = '') {
super(error, error_description || error);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second argument is passed to the Error constructor, so I ensured it's identical as before.

src/errors.tsx Outdated Show resolved Hide resolved
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 08:56 — with GitHub Actions Inactive
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 08:56 — with GitHub Actions Inactive
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 08:56 — with GitHub Actions Inactive
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 08:56 — with GitHub Actions Inactive
Co-authored-by: Adam Mcgrath <adam.mcgrath@auth0.com>
Signed-off-by: Frederik Prijck <frederik.prijck@gmail.com>
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 09:28 — with GitHub Actions Inactive
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 09:28 — with GitHub Actions Inactive
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 09:28 — with GitHub Actions Inactive
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 09:28 — with GitHub Actions Inactive
Signed-off-by: Frederik Prijck <frederik.prijck@auth0.com>
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 09:41 — with GitHub Actions Inactive
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 09:41 — with GitHub Actions Inactive
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 09:41 — with GitHub Actions Inactive
@frederikprijck frederikprijck temporarily deployed to internal October 31, 2023 09:41 — with GitHub Actions Inactive
@frederikprijck frederikprijck merged commit 9079a32 into main Oct 31, 2023
14 checks passed
@frederikprijck frederikprijck deleted the chore/oautherror branch October 31, 2023 09:49
@frederikprijck frederikprijck mentioned this pull request Oct 31, 2023
@elstgav elstgav mentioned this pull request Nov 1, 2023
6 tasks
frederikprijck added a commit that referenced this pull request Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants