Interface RestApiExceptionParser

All Known Implementing Classes:
RestApiExceptionParserImpl

public interface RestApiExceptionParser
A http response parser that creates a RestApiException.
Author:
Christian Bremer
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bremersee.exception.model.RestApiException
    parseException(byte[] response, org.springframework.http.HttpStatusCode httpStatus, org.springframework.http.HttpHeaders headers)
    Parse exception.
    default org.bremersee.exception.model.RestApiException
    parseException(InputStream response, org.springframework.http.HttpStatusCode httpStatus, org.springframework.http.HttpHeaders headers)
    Parse exception.
    org.bremersee.exception.model.RestApiException
    parseException(String response, org.springframework.http.HttpStatusCode httpStatus, org.springframework.http.HttpHeaders headers)
    Parse exception.
  • Method Details

    • parseException

      org.bremersee.exception.model.RestApiException parseException(String response, org.springframework.http.HttpStatusCode httpStatus, org.springframework.http.HttpHeaders headers)
      Parse exception.
      Parameters:
      response - the response
      httpStatus - the http status
      headers - the headers
      Returns:
      the parsed exception
    • parseException

      org.bremersee.exception.model.RestApiException parseException(byte[] response, org.springframework.http.HttpStatusCode httpStatus, org.springframework.http.HttpHeaders headers)
      Parse exception.
      Parameters:
      response - the response
      httpStatus - the http status
      headers - the headers
      Returns:
      the parsed exception
    • parseException

      default org.bremersee.exception.model.RestApiException parseException(InputStream response, org.springframework.http.HttpStatusCode httpStatus, org.springframework.http.HttpHeaders headers) throws IOException
      Parse exception.
      Parameters:
      response - the response
      httpStatus - the http status
      headers - the headers
      Returns:
      the rest api exception
      Throws:
      IOException - the io exception