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

correctly display string-typed errors #544

Merged
merged 1 commit into from
Dec 20, 2023
Merged

correctly display string-typed errors #544

merged 1 commit into from
Dec 20, 2023

Conversation

missinglink
Copy link
Member

@missinglink missinglink commented Dec 20, 2023

The errors generated in https://github.com/pelias/whosonfirst/blob/master/src/bundleList.js are of type string, when combined with throwing err.message no error message was printed to the terminal.

This PR improves the error reporting by throwing the original error (if of type Error), else wrapping the string in a new Error object, although the latter method loses stack info.

related pelias/docker#334

@missinglink missinglink merged commit a127805 into master Dec 20, 2023
7 checks passed
@missinglink missinglink deleted the import-errors branch December 20, 2023 10:58
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.

1 participant