github-advanced-security[bot] commented on code in PR #7:
URL:
https://github.com/apache/sling-org-apache-sling-serviceuser-webconsole/pull/7#discussion_r2501372283
##########
src/main/java/org/apache/sling/serviceuser/webconsole/impl/ServiceUserWebConsolePlugin.java:
##########
@@ -216,7 +225,7 @@
try {
sendErrorRedirect(request, response, "Unexpected exception: "
+ e);
} catch (IOException e2) {
- throw new IOException("Failed to send error response", e2);
+
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Failed to
send error redirect");
Review Comment:
## Exceptions should not be thrown from servlet methods
<!--SONAR_ISSUE_KEY:AZpb6C4DRheN21Ko-3Ht-->Handle the following exception
that could be thrown by "sendError": IOException. <p>See more on <a
href="https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-serviceuser-webconsole&issues=AZpb6C4DRheN21Ko-3Ht&open=AZpb6C4DRheN21Ko-3Ht&pullRequest=7">SonarQube
Cloud</a></p>
[Show more
details](https://github.com/apache/sling-org-apache-sling-serviceuser-webconsole/security/code-scanning/8)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]