Class ApiException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.extensions.surf.exception.PlatformRuntimeException
org.alfresco.rest.framework.core.exceptions.ApiException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ConstraintViolatedException, DisabledServiceException, InsufficientStorageException, InvalidArgumentException, NotFoundException, PermissionDeniedException, RequestEntityTooLargeException, ServiceUnavailableException, StaleEntityException, UnsupportedMediaTypeException, UnsupportedResourceOperationException

public class ApiException extends org.springframework.extensions.surf.exception.PlatformRuntimeException
Base exception for errors in the API framework. In general, we don't want developers having to think about http status codes or rendering responses to the user. This exception hierarchy is designed to abstract the http logic away so the developer can concentrate on implementing services logic. The framework will attempt to render errors in a consistent way. Default status is STATUS_INTERNAL_SERVER_ERROR = 500.
Author:
Gethin James
See Also:
  • Constructor Details

  • Method Details

    • getAdditionalState

      public Map<String,Object> getAdditionalState()
      A free-form object that contains any additional state that the developer thinks might be relevant for troubleshooting. This object will be rendered as JSON.
    • getMsgId

      public String getMsgId()
      Returns the message id key.
      Returns:
      String messageId