Show correct error message on initial load

Summary: This fixes an issue that caused us to show a confusing message on the initial load. I guess at some point the field was renamed. The code falls back to the "generic" message if it can't parse JSON, and in this case, it couldn't find the field called `description` as it's now called `message`.

Reviewed By: cpojer

Differential Revision: D16073931

fbshipit-source-id: a70ae28635b72f674cb1da26f89744b4214f18d9
This commit is contained in:
Dan Abramov authored and Facebook Github Bot committed 2019-07-01 10:19:29 -07:00
1 parent ce9c47f34b
commit d3f9f88860
1 file changed
+1 -1
@@ -69,7 +69,7 @@ public class DebugServerException extends RuntimeException {
JSONObject jsonObject = new JSONObject(str);
String fullFileName = jsonObject.getString("filename");
return new DebugServerException(
jsonObject.getString("description"),
jsonObject.getString("message"),
shortenFileName(fullFileName),
jsonObject.getInt("lineNumber"),
jsonObject.getInt("column"));