Interface ErrorResponseEventContext.ErrorResponse

All Superinterfaces:
com.sap.cds.CdsData, com.sap.cds.JSONizable, Map<String,Object>
Enclosing interface:
ErrorResponseEventContext

public static interface ErrorResponseEventContext.ErrorResponse extends com.sap.cds.CdsData
Error response generated by the event handler.
  • Method Details

    • create

      Creates a new instance of ErrorResponseEventContext.ErrorResponse.
      Returns:
      the instance of ErrorResponseEventContext.ErrorResponse.
    • getHttpStatus

      Integer getHttpStatus()
      Returns the HTTP status to be used in the error response.
      Returns:
      the HTTP status.
    • setHttpStatus

      void setHttpStatus(Integer httpStatus)
      Sets the HTTP status to be used in the error response.
      Parameters:
      httpStatus - the HTTP status to be used in the error response.
    • getMessages

      List<Message> getMessages()
      Returns the list of Message objects to be written in the error response.
      Returns:
      the list of Message objects to be written in the error response.
    • setMessages

      void setMessages(List<Message> messages)
      Sets the list of Message objects to be written in the error response. The first message of the list will be used as the primary error in the response generated by the OData V2 and V4 protocol adapters.
      Parameters:
      messages - the list of Message objects to be written in the error response.