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(remix): Prevent capturing pending Promises as exceptions. #6129

Merged
merged 1 commit into from Nov 3, 2022

Conversation

onurtemizkan
Copy link
Collaborator

Closes: #5963

The reason we have been getting exceptions from Remix SDK captured as, {} even if the response is not an empty object (see: #5963) was apparently the pending Promises returned from extractData.

Implemented the async logic and added another abstraction specifically for error responses, to make sure the errors do not end up misnamed.

Based on Remix examples of how to throw a json(...), this implementation favours:

1 - response (if response is a string)
2 - response.statusText
3 - The extracted response object, which will eventually be handled by Node SDK's eventbuilder

While extracting data from an error response.

@AbhiPrasad AbhiPrasad merged commit fae7b24 into master Nov 3, 2022
@AbhiPrasad AbhiPrasad deleted the onur/fix-remix-server-error-extractor branch November 3, 2022 14:52
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.

Wrong exception name (Object.captureException) when a 500 with Remix json response
2 participants