Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Abort resource handling if dev server resource handling fails (#18484) (CP: 24.3) #18507

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,27 @@ public boolean serveStaticResource(HttpServletRequest request,
return true;
}
} catch (IOException e) {
getLogger().error("Unable to load " + filenameWithPath
+ " from the frontend dev server: " + e.getMessage());
if (getLogger().isTraceEnabled()) {
getLogger().trace("Unable to load " + filenameWithPath
+ " from the frontend dev server", e);
} else {
getLogger().error("Unable to load " + filenameWithPath
+ " from the frontend dev server: " + e.getMessage());
}
try {
response.sendError(
HttpStatusCode.INTERNAL_SERVER_ERROR.getCode(),
"Unable to load " + filenameWithPath
+ " from the frontend dev server: "
+ e.getMessage());
} catch (Exception ee) {
// The server might have partly written an output. If so, let's
// just go with that
getLogger().trace(
"Ignoring exception when writing dev server error response",
ee);
}
return true;
}

URL resourceUrl = null;
Expand Down
Loading