Class MethodNotAllowedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalStateException
com.djrapitops.plan.delivery.web.resolver.exception.MethodNotAllowedException
All Implemented Interfaces:
Serializable

public class MethodNotAllowedException extends IllegalStateException
Throw this exception when a Resolver gets invalid Request.getMethod().

Plan will construct error json automatically. Note that you might need to handle the error page, which is json: {"status": 405, "error": "message"}

See Also:
  • Constructor Details

    • MethodNotAllowedException

      public MethodNotAllowedException(String... allowedMethods)
      Default constructor.
      Parameters:
      allowedMethods - POST, GET, etc. - avoid including any input incoming in the request to prevent XSS.
  • Method Details

    • getAllowedMethods

      public String[] getAllowedMethods()