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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user