Class JsonPipelineInputException

  • All Implemented Interfaces:
    Serializable

    @ProviderType
    public final class JsonPipelineInputException
    extends RuntimeException
    Used to indicate that the JSON input data of a JsonPipeline could not be retrieved, was invalid JSON, or didn't match the expected data structure.
    See Also:
    Serialized Form
    • Constructor Detail

      • JsonPipelineInputException

        public JsonPipelineInputException​(int statusCode,
                                          String msg)
        Parameters:
        statusCode - the status code to use in the HTTP response
        msg - the error message (that will also be used as reason string in the HTTP response)
      • JsonPipelineInputException

        public JsonPipelineInputException​(int statusCode,
                                          String msg,
                                          Throwable cause)
        Parameters:
        statusCode - the status code to use in the HTTP response
        msg - the error message (that will also be used as reason string in the HTTP response)
        cause - Cause
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        Provides the appropriate status code for this exception. If the underlying HTTP request fails, the status code will be taken from the HTTP response. If JSON parsing or object mapping failed, the status code will be 500.
        Returns:
        the HTTP status code
      • getReason

        public String getReason()
        Returns:
        exception reason.
      • setReason

        public JsonPipelineInputException setReason​(String reasonPhrase)
        Parameters:
        reasonPhrase - the reason line from the HTTP response headers
        Returns:
        this