# 1. framework defaults (a plain RestClient, no status handler) findById(99) -> HttpClientErrorException$NotFound status : 404 NOT_FOUND message : 404 Not Found: "{"type":"https://stub.example/problems/post-not-found","title":"Post not found","status":404,"detail":"No post with id 99","instance":"/posts/99"}" content-type: application/problem+json getResponseBodyAs(ProblemDetail): title='Post not found' detail='No post with id 99' type=https://stub.example/problems/post-not-found alwaysDown() -> HttpServerErrorException.ServiceUnavailable, status 503 SERVICE_UNAVAILABLE # 2. a response that never comes: read timeout is 1500ms on the flaky group, /slow takes 3000ms slow() -> ResourceAccessException, cause java.net.http.HttpTimeoutException message: I/O error on GET request for "http://127.0.0.1:/slow": Request cancelled # 3. nobody listening findAll() -> ResourceAccessException, cause java.net.ConnectException # 4. Optional and ResponseEntity on a 404 with the default handler findOptional(99) -> NotFound findEntity(99) -> NotFound # 5. NotFoundRestClientAdapterDecorator (spring-web 7.0.10) turns a 404 into an empty result findById(99) -> null findOptional(99) -> Optional.empty findEntity(99) -> status 404 NOT_FOUND, body null # 6. our own defaultStatusHandler on the "posts" group (UpstreamProblemStatusHandler) findById(99) -> UpstreamNotFoundException: Upstream says not found: No post with id 99 problem.type=https://stub.example/problems/post-not-found instance=/posts/99 create(blank title) -> UpstreamValidationException: Upstream rejected the request: Validation failed extension 'errors' = [{field=title, message=must not be blank}] alwaysDown() -> UpstreamUnavailableException: Upstream unavailable (503): Upstream is down for maintenance