LegacyFrontendErrorHandler

uk.gov.hmrc.play.bootstrap.frontend.http.LegacyFrontendErrorHandler
abstract class LegacyFrontendErrorHandler extends HttpErrorHandler, I18nSupport

FrontendErrorHandler should be used instead, which supports asynchronous rendering and doesn't pretend to provide a Request (rather than RequestHeader), where no request body is available.

Attributes

Deprecated
[Since version 9.0.0]
Graph
Supertypes
trait I18nSupport
trait I18NSupportLowPriorityImplicits
trait HttpErrorHandler
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited classlikes

implicit class RequestWithMessagesApi(request: RequestHeader)

Adds convenient methods to handle the messages.

Adds convenient methods to handle the messages.

Attributes

Inherited from:
I18NSupportLowPriorityImplicits
Supertypes
class Object
trait Matchable
class Any
implicit class ResultWithMessagesApi(result: Result)

Adds convenient methods to handle the client-side language

Adds convenient methods to handle the client-side language

Attributes

Inherited from:
I18NSupportLowPriorityImplicits
Supertypes
class Object
trait Matchable
class Any

Value members

Abstract methods

def standardErrorTemplate(pageTitle: String, heading: String, message: String)(implicit request: Request[_]): Html

Concrete methods

def badRequestTemplate(implicit request: Request[_]): Html
def fallbackClientErrorTemplate(implicit request: Request[_]): Html
def internalServerErrorTemplate(implicit request: Request[_]): Html
def notFoundTemplate(implicit request: Request[_]): Html
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
HttpErrorHandler
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
HttpErrorHandler
def resolveError(rh: RequestHeader, ex: Throwable): Result

Inherited methods

def messagesApi: MessagesApi

Attributes

Inherited from:
I18nSupport

Implicits

Inherited implicits

final implicit def RequestWithMessagesApi(request: RequestHeader): RequestWithMessagesApi

Adds convenient methods to handle the messages.

Adds convenient methods to handle the messages.

Attributes

Inherited from:
I18NSupportLowPriorityImplicits
final implicit def ResultWithMessagesApi(result: Result): ResultWithMessagesApi

Adds convenient methods to handle the client-side language

Adds convenient methods to handle the client-side language

Attributes

Inherited from:
I18NSupportLowPriorityImplicits
implicit def request2Messages(implicit request: RequestHeader): Messages

Converts from a request directly into a Messages.

Converts from a request directly into a Messages.

Value parameters

request

the incoming request

Attributes

Returns

The preferred Messages according to the given play.api.mvc.RequestHeader

Inherited from:
I18nSupport