DevHttpErrorHandler

play.api.http.DevHttpErrorHandler

A default HTTP error handler that can be used when there's no application available.

Note: this HttpErrorHandler should ONLY be used in DEV or TEST. The way this displays errors to the user is generally not suitable for a production environment.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete 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
override def onServerError(request: RequestHeader, exception: Throwable): Future[Result]

Invoked when a server error occurs.

Invoked when a server error occurs.

By default, the implementation of this method delegates to onProdServerError when in prod mode, and onDevServerError in dev mode. It is recommended, if you want Play's debug info on the error page in dev mode, that you override onProdServerError instead of this method.

Value parameters

exception

The server error.

request

The request that triggered the server error.

Attributes

Definition Classes

Inherited methods

def setPlayEditor(editor: String): Unit

Sets the play editor to the given string after initialization. Used for tests, or cases where the existing configuration isn't sufficient.

Sets the play editor to the given string after initialization. Used for tests, or cases where the existing configuration isn't sufficient.

Value parameters

editor

the play editor string.

Attributes

Inherited from:
DefaultHttpErrorHandler