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 error logging when thrown errors are strings #1761

Merged
merged 1 commit into from
Jul 21, 2018

Conversation

DeMoorJasper
Copy link
Member

Fixes #1752

@DeMoorJasper DeMoorJasper changed the title Fix error logging when thrown errors are not an Error object Fix error logging when thrown errors are strings Jul 19, 2018
error[key] = json[key];
});
return error;
}
Copy link
Contributor

@fathyb fathyb Jul 21, 2018

Choose a reason for hiding this comment

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

Shouldn't we return something like new Error('Unknown error'), or do it in errorToJson?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not even sure why it would ever throw something else than an Error object.

I guess I can add a fallback for unknown error

@devongovett devongovett merged commit 3298473 into master Jul 21, 2018
@devongovett devongovett deleted the fix/error-strings branch July 21, 2018 20:38
devongovett pushed a commit that referenced this pull request Oct 15, 2018
devongovett pushed a commit that referenced this pull request Oct 15, 2018
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.

3 participants