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

Fix TypeError when throwing by using standard Error #45

Closed
wants to merge 1 commit into from

Conversation

onurcagan
Copy link

throw new errors.Abort(errors);
^
TypeError: errors.Abort is not a constructor.

Before this change, attempting to throw a custom Abort error resulted in a TypeError because Abort was not a constructor. This commit fixes the issue by throwing a standard Error with the user error messages, ensuring that the actual error message is displayed correctly.

throw new errors.Abort(errors);
          ^
TypeError: errors.Abort is not a constructor.

Before this change, attempting to throw a custom `Abort` error resulted in a TypeError because `Abort` was not a constructor. This commit fixes the issue by throwing a standard Error with the user error messages, ensuring that the actual error message is displayed correctly.
@kinngh kinngh closed this Jan 13, 2024
@kinngh
Copy link
Owner

kinngh commented Jan 13, 2024

I don't accept PRs in the repo - I'll have it fixed instead.

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

2 participants