Skip to content

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