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 RN redbox messages for syntax errors by including error messages in payload #124

Closed
wants to merge 1 commit into from

Commits on Jan 15, 2018

  1. Fix RN redbox messages for syntax errors by including error messages …

    …in payload
    
    With RN 0.52, when there was a redbox due to a syntax error in a source file (with regular, non-delta bundler), the redbox would say just "No message provided". The JSON that Metro sent to RN did not include a "message" field because `JSON.stringify(error)` does not include `message`.
    
    Test Plan: Add a syntax error to one of the files in RNTester's JS and load the RNTester app (from RN master). See that the redbox now says there was a transform error with info about where the syntax error is.
    
    Also tested adding a syntax error with HMR enabled and saw that the error `message` field was set in the payload as expected.
    
    Also added a Jest test to Server-test.js.
    ide committed Jan 15, 2018
    Configuration menu
    Copy the full SHA
    6d5878d View commit details
    Browse the repository at this point in the history