fix: logging an error when unit iframe fails to load

Right now we log nothing to the logging service when a unit iframe fails to load.  The ErrorPage that’s shown isn’t using the ErrorBoundary, so we had no indication that something went wrong.  This solves the problem closer to the source where the error originates.
This commit is contained in:
David Joy
2023-05-15 17:01:15 -04:00
committed by David Joy
parent d2de0632cd
commit 5997b29cee

View File

@@ -251,6 +251,9 @@ const Unit = ({
// could have given us a 4xx or 5xx response.
if (!hasLoaded) {
setShowError(true);
logError('Unit iframe failed to load. Server possibly returned 4xx or 5xx response.', {
iframeUrl,
});
}
window.onmessage = (e) => {