Package com.surrealdb
Class NotAllowedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.surrealdb.SurrealException
com.surrealdb.ServerException
com.surrealdb.NotAllowedException
- All Implemented Interfaces:
Serializable
Permission denied, method not allowed, function or scripting blocked.
Details use the {kind, details?} format with variants defined
in NotAllowedDetailKind. Auth details further nest
AuthDetailKind variants.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the function that is not allowed, if applicable.Returns the name of the method that is not allowed, if applicable.Returns the name of the target that is not allowed, if applicable.booleanReturnstruewhen authentication failed (invalid credentials).booleanReturnstruewhen scripting is blocked.booleanReturnstruewhen the token used for authentication has expired.Methods inherited from class com.surrealdb.ServerException
findCause, findCause, getDetails, getKind, getKindEnum, getServerCause, hasKind, hasKindMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
isTokenExpired
public boolean isTokenExpired()Returnstruewhen the token used for authentication has expired.- Returns:
- whether the detail matches
Auth -> TokenExpired
-
isInvalidAuth
public boolean isInvalidAuth()Returnstruewhen authentication failed (invalid credentials).- Returns:
- whether the detail matches
Auth -> InvalidAuth
-
isScriptingBlocked
public boolean isScriptingBlocked()Returnstruewhen scripting is blocked.- Returns:
- whether the detail kind is
Scripting
-
getMethodName
Returns the name of the method that is not allowed, if applicable.- Returns:
- the method name, or
null
-
getFunctionName
Returns the name of the function that is not allowed, if applicable.- Returns:
- the function name, or
null
-
getTargetName
Returns the name of the target that is not allowed, if applicable.- Returns:
- the target name, or
null
-