Class DbAclGenericExceptionMapper

java.lang.Object
com.illumon.iris.db.v2.permissions.rs.BaseExceptionMapper<Throwable>
com.illumon.iris.db.v2.permissions.rs.exceptions.DbAclGenericExceptionMapper
All Implemented Interfaces:
io.deephaven.shadow.resteasy.javax.ws.rs.ext.ExceptionMapper<Throwable>

@Provider public class DbAclGenericExceptionMapper extends BaseExceptionMapper<Throwable>
The ExceptionMapper for all Throwable raised in the acl api. If error is not one of DbAclCheckedException, DbAclUncheckedException, JsonMappingException, JsonParseException, and UnrecognizedPropertyExceptionHandler or any other exception is raised then this will be the mapper used. If the exception is of type WebApplicationException then its Response.Status used otherwise Response.Status.INTERNAL_SERVER_ERROR is returned.

Populates AuditEvent with basic error information known at HttpServletRequest level

  • Constructor Details

    • DbAclGenericExceptionMapper

      public DbAclGenericExceptionMapper()
  • Method Details

    • getCommandName

      protected String getCommandName(@NotNull Throwable exception)
      Description copied from class: BaseExceptionMapper
      The name of the command the request uri points to, if NPE or generic error would include the requestURI
      Specified by:
      getCommandName in class BaseExceptionMapper<Throwable>
      Parameters:
      exception - The exception that has occurred
      Returns:
      name of the command the request uri points to
    • getErrorDetails

      protected String getErrorDetails(@NotNull Throwable exception)
      Description copied from class: BaseExceptionMapper
      Part of the error message that is logged, allows implementations to customize what can be included
      Specified by:
      getErrorDetails in class BaseExceptionMapper<Throwable>
      Parameters:
      exception - The exception that has occurred
      Returns:
      string with customized details about the specific error
    • getResponseStatus

      protected io.deephaven.shadow.resteasy.javax.ws.rs.core.Response.Status getResponseStatus(@NotNull Throwable exception)
      Description copied from class: BaseExceptionMapper
      Implementations should return the appropriate Response Status to build and propagate in the Response
      Specified by:
      getResponseStatus in class BaseExceptionMapper<Throwable>
      Parameters:
      exception - The thrown exception used to extract the response status
      Returns:
      The Response Status for the exception
    • updateAuditEventBuilder

      protected void updateAuditEventBuilder(@NotNull io.deephaven.enterprise.auth.audit.AuditEventBuilder aeBuilder, @NotNull Throwable exception)
      Description copied from class: BaseExceptionMapper
      The implementations can add customization detail of what to log for in AuditEvent
      Specified by:
      updateAuditEventBuilder in class BaseExceptionMapper<Throwable>
      Parameters:
      aeBuilder - The AuditEventBuilder instance being used in building the AuditEvent to log
      exception - The thrown exception