Interface HttpErrorResponse

All Known Implementing Classes:
Http400Exception, Http401Exception, Http403Exception, Http404Exception, Http413Exception, Http422Exception, Http429Exception, Http500Exception, Http502Exception, Http503Exception, HttpUnmappedStatusException

public interface HttpErrorResponse
Implemented by every exception that was raised from an HTTP status code, so the server's own response can be read without knowing which of the eleven carriers (the ten HttpNNNException classes and HttpUnmappedStatusException) was thrown or which semantic parent it sits under.

Catch by the semantic parent when you care about what to DO (InvalidInputException means the LLM may retry with fixed input); test for this interface when you care about what the server SAID.

Implementors supply http() and inherit the accessors. Note that a class-declared method beats an interface default, so no implementor may declare these accessors itself or on any superclass - that would silently shadow the carrier.

Since:
0.1 (2026-08-16)
Author:
Andrey Santrosyan
  • Method Details

    • http

      The server's response: status, service, endpoint, raw body. The one record the carrier built at construction, returned identically on every call.
    • getStatusCode

      default int getStatusCode()
    • getService

      default String getService()
    • getEndpoint

      default String getEndpoint()
    • getResponseBody

      default String getResponseBody()