HtmlOrJsonHttpErrorHandler

play.api.http.HtmlOrJsonHttpErrorHandler

An HttpErrorHandler that uses either HTML or JSON in the response depending on the client's preference.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

override def onClientError(request: RequestHeader, statusCode: Int, message: String): Future[Result]

Invoked when a client error occurs, that is, an error in the 4xx series.

Invoked when a client error occurs, that is, an error in the 4xx series.

Value parameters

message

The error message.

request

The request that caused the client error.

statusCode

The error status code. Must be greater or equal to 400, and less than 500.

Attributes

Definition Classes
Inherited from:
PreferredMediaTypeHttpErrorHandler
override def onServerError(request: RequestHeader, exception: Throwable): Future[Result]

Invoked when a server error occurs.

Invoked when a server error occurs.

Value parameters

exception

The server error.

request

The request that triggered the server error.

Attributes

Definition Classes
Inherited from:
PreferredMediaTypeHttpErrorHandler

Inherited fields