Package play.http

Class HttpErrorInfo

java.lang.Object
play.http.HttpErrorInfo

@ApiMayChange public abstract class HttpErrorInfo extends Object
Used as request attribute which gets attached to the request that gets passed to an error handler. Contains additional information useful for handling an error.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract String
    The origin of where the error handler was initially called.
    Play currently adds following values: server-backend - The error handler was called in either the Netty or Pekko-HTTP server backend.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HttpErrorInfo

      public HttpErrorInfo()
  • Method Details

    • origin

      public abstract String origin()
      The origin of where the error handler was initially called.
      Play currently adds following values:
      • server-backend - The error handler was called in either the Netty or Pekko-HTTP server backend.
      • csrf-filter - The error handler was called in CSRF filter code.
      • csp-filter - The error handler was called in CSP filter code.
      • allowed-hosts-filter - The error handler was called in Allowed hosts filter code.
      Third party modules may add their own origins.