mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-22 05:49:04 +00:00
Prior to this commit, ExchangeResult.assertWithDiagnostics() threw an IllegalArgumentException for a custom HTTP status code since toString() invoked getStatus() without a try-catch block. This commit addresses this issue by introducing a formatStatus() method that defensively formats the response status, initially trying to format the HttpStatus and falling back to formatting the raw integer status code. Closes gh-29283