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

wrap exceptions thrown in profile.map calls #16

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

stackoverfloweth
Copy link
Collaborator

@stackoverfloweth stackoverfloweth commented Mar 20, 2024

this gives end developers the opportunity to setup logging to watch for specific ProfileMappingError, which provides more context when a model might change without Typescript being updated

@stackoverfloweth stackoverfloweth self-assigned this Mar 20, 2024
Copy link

netlify bot commented Mar 20, 2024

Deploy Preview for kitbag-mapper ready!

Name Link
🔨 Latest commit 7b4d5dc
🔍 Latest deploy log https://app.netlify.com/sites/kitbag-mapper/deploys/65fb27e900d8510008f9fcb2
😎 Deploy Preview https://deploy-preview-16--kitbag-mapper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@pleek91
Copy link
Contributor

pleek91 commented Mar 20, 2024

@stackoverfloweth does this still show you the original error? I'm not familiar with ErrorOptions or what it does when passed to the Error constructor.

@stackoverfloweth
Copy link
Collaborator Author

@stackoverfloweth does this still show you the original error? I'm not familiar with ErrorOptions or what it does when passed to the Error constructor.

That is my expectation. This is precisely what the property is for.

It is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause

@stackoverfloweth stackoverfloweth merged commit e381195 into main Mar 21, 2024
6 checks passed
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.

2 participants