Interface HttpClientErrorDecoder


@Internal public interface HttpClientErrorDecoder
Strategy interface for decoding the error from a server respponse.
Since:
1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The default implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    default io.micronaut.core.type.Argument<?>
    getErrorType(io.micronaut.http.MediaType mediaType)
    Gets the error type for the given media type.
    default Optional<String>
    Default message decoder.
  • Field Details

  • Method Details

    • getMessage

      default Optional<String> getMessage(Object error)
      Default message decoder.
      Parameters:
      error - The error object
      Returns:
      The message
    • getErrorType

      default io.micronaut.core.type.Argument<?> getErrorType(io.micronaut.http.MediaType mediaType)
      Gets the error type for the given media type.
      Parameters:
      mediaType - The media type
      Returns:
      The error type