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): Return response if detected in root loader #5558

Merged
merged 4 commits into from Aug 10, 2022

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Aug 10, 2022

Based on @augustuswm's excellent suggestion in #5539 (comment), this patch updates the remix root loader wrapper to return a response when possible. This allows user set headers to be propogated.

We do this by vendoring in Remix's json utility and using it accordingly. We also now return the response directly instead of the data in cases where the data is not an object.

@AbhiPrasad AbhiPrasad added this to the Sentry Remix SDK milestone Aug 10, 2022
@AbhiPrasad AbhiPrasad marked this pull request as ready for review August 10, 2022 15:56
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.38 KB (-0.02% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 59.99 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 17.96 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified) 52.88 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 19.73 KB (0%)
@sentry/browser - Webpack (minified) 64.21 KB (0%)
@sentry/react - Webpack (gzipped + minified) 19.75 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 44.16 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 25.79 KB (-0.01% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.04 KB (-0.02% 🔽)

Copy link
Collaborator

@onurtemizkan onurtemizkan left a comment

Choose a reason for hiding this comment

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

LGTM!

@AbhiPrasad AbhiPrasad merged commit 0c0ae91 into master Aug 10, 2022
@AbhiPrasad AbhiPrasad deleted the abhi-remix-response branch August 10, 2022 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants