Add content type header for the open in editor toolbar button#229
Merged
emily8rown merged 1 commit intoDec 18, 2025
Merged
Conversation
huntie
approved these changes
Dec 18, 2025
meta-codesync Bot
pushed a commit
to facebook/react-native
that referenced
this pull request
Dec 19, 2025
…el devtools button (#54927) Summary: Updating front end assets for react/react-native-devtools-frontend#229 The "Open in Editor" button in the Sources tab was failing with a 400 Bad Request error. This was because the openStackFrameInEditor request was missing the Content-Type header. Added the appropriate content type header to fix the request. ## Changelog: [GENERAL] [INTERNAL] - Fix "Open in Editor" button in Sources tab returning 400 Bad Request Pull Request resolved: #54927 Test Plan: Open React Native DevTools Go to Sources tab Click "Open in Editor" button on a stack frame Verify the file opens in the editor without a 400 error Reviewed By: vzaidman Differential Revision: D89464184 Pulled By: emily8rown fbshipit-source-id: 27190e05e11d96bdd9982a4e057c3ef225975bc4
sbuggay
pushed a commit
to sbuggay/react-native-devtools-frontend
that referenced
this pull request
Jan 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add missing
Content-Type: application/jsonheader to the "Open in Editor" fetch request.The
/open-stack-frameendpoint expects a JSON body, but the fetch call was missing the Content-Type header. This caused Metro's body parser to reject the request when running in strict mode.Test plan
DEV=1 js1 runjin Metro terminal)Upstreaming plan
devtools-frontendrepo following the contribution guide for Meta employees OR contribution guide.