Package org.dspace.app.rest.exception
Class RESTBitstreamNotFoundException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.dspace.app.rest.exception.UnprocessableEntityException
org.dspace.app.rest.exception.RESTBitstreamNotFoundException
- All Implemented Interfaces:
Serializable,TranslatableException
public class RESTBitstreamNotFoundException
extends UnprocessableEntityException
implements TranslatableException
Extend UnprocessableEntityException to provide a specific error message
in the REST response. The error message is added to the response in
DSpaceApiExceptionControllerAdvice.handleCustomUnprocessableEntityException(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse, org.dspace.app.rest.exception.TranslatableException),
hence it should not contain sensitive or security-compromising info.
- Author:
- Jens Vannerum (jens.vannerum@atmire.com)
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.dspace.app.rest.exception.TranslatableException
getLocalizedMessage, getMessage
-
Field Details
-
uuid
-
MESSAGE_KEY
- See Also:
-
-
Constructor Details
-
RESTBitstreamNotFoundException
-
-
Method Details
-
getMessageKey
- Specified by:
getMessageKeyin interfaceTranslatableException- Returns:
- message key (used for lookup with
I18nUtil)
-
getLocalizedMessage
- Specified by:
getLocalizedMessagein interfaceTranslatableException- Parameters:
context- current DSpace context (used to infer current locale)- Returns:
- message for current locale (or default locale if current locale did not yield a result)
-