onkar717 opened a new pull request, #965: URL: https://github.com/apache/tomcat/pull/965
## Description Add dedicated test coverage for JsonErrorReportValve. JsonErrorReportValve currently lacks specific tests compared to ErrorReportValve. This PR introduces TestJsonErrorReportValve to verify JSON error reporting behavior. ## Motivation JsonErrorReportValve does not currently have dedicated tests. Adding coverage helps ensure correctness and stability of JSON error reporting functionality. ## Tests added • JSON response for HTTP 500 errors • JSON response for HTTP 404 errors • Throwable information when exceptions occur • JSON escaping of special characters • Custom status code handling • Chained exception handling ## Implementation notes Tests follow existing patterns from TestErrorReportValve and use TomcatBaseTest utilities. No new dependencies were introduced. ## Impact Improves test coverage and helps prevent regressions. No production code changes were made. This is a test-only change. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
