Improve error log for failed open-debugger fetch (#49295)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49295

Motivated by https://github.com/facebook/react-native/issues/49287.

This improves on the less useful output of "fetch failed" currently. We expect failing to make a request to the dev server (made from the dev server!) to be a rare edge case, in which case we want to log as much info as possible.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D69395983

fbshipit-source-id: ee96d72ade5a887d190397c3b798a5b545152587
This commit is contained in:
Alex Hunt
2025-02-10 06:01:48 -08:00
committed by Facebook GitHub Bot
parent 4e2f5bd7ea
commit 1cfc53bb70
@@ -54,8 +54,11 @@ export default class OpenDebuggerKeyboardHandler {
'Failed to open debugger for %s (%s): %s',
target.title,
target.description,
e.message,
'Network error',
);
if (e.cause != null) {
this.#log('error', 'Cause: %s', e.cause);
}
this.#clearTerminalMenu();
}
}