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 2019-07-01 10:14:32 -07:00 коммит произвёл Facebook Github Bot
Родитель ce9c47f34b
Коммит d3f9f88860
1 изменённых файлов: 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"));