FrontendErrorHandler

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

Attributes

Graph
Supertypes
trait LangImplicits
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: RequestHeader): Future[Html]

To be provided to wire up to a View. The page title should be modified to adhere to the organisation guidelines - See Default Error Handling section in README

To be provided to wire up to a View. The page title should be modified to adhere to the organisation guidelines - See Default Error Handling section in README

Attributes

Concrete methods

def badRequestTemplate(implicit request: RequestHeader): Future[Html]
def fallbackClientErrorTemplate(implicit request: RequestHeader): Future[Html]
def internalServerErrorTemplate(implicit request: RequestHeader): Future[Html]
def notFoundTemplate(implicit request: RequestHeader): Future[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): Future[Result]

Inherited and Abstract methods

def messagesApi: MessagesApi

Attributes

Inherited from:
LangImplicits

Implicits

Implicits

implicit protected val ec: ExecutionContext
implicit override 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

Definition Classes
I18nSupport

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 lang2Messages(implicit lang: Lang): Messages

Attributes

Returns

A Messages value that uses the Lang found in the implicit scope.

Inherited from:
LangImplicits