Package org.apache.tapestry5.services

# Class HttpError

java.lang.Object
org.apache.tapestry5.services.HttpError

public final class HttpError extends Object
An event handler method may return an instance of this class to send an error response to the client. If you need something similar but not for errors, such as statuses in the 2xx range, use `instead`.

Since:
  5.2.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HttpError(int statusCode, String message)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getMessage()`
  Returns error message.
  `int`
  `getStatusCode()`
  Returns the error status code.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### HttpError

    public HttpError(int statusCode, String message)

- ## Method Details

  - ### getStatusCode

    public int getStatusCode()
    Returns the error status code.

  - ### getMessage

    public String getMessage()
    Returns error message.