Class ErrorResponse

  • All Implemented Interfaces:
    Serializable, FFDCResponse

    public class ErrorResponse
    extends AnalyticsModelingOMASAPIResponse
    Response to return error. Sample of an error: { "class" : "ErrorResponse", "relatedHTTPCode" : 500, "exceptionClassName": "org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException", "exceptionCausedBy": "org.odpi.openmetadata.accessservices.analyticsmodeling.ffdc.exceptions.AnalyticsModelingCheckedException", "actionDescription": "getModule", "exceptionErrorMessage": "OMAG-COMMON-400-016 An unexpected org.odpi.openmetadata.accessservices.analyticsmodeling.ffdc.exceptions.AnalyticsModelingCheckedException exception was caught by getModule; error message was OMAS-ANALYTICS-MODELING-003 Relationship AttributeForSchema for entity gen!RDBST@(host)=vottcteds4.canlab.ibm.com::(database)=adventworksDW::(database_schema)=dbo could not be fetched.", "exceptionErrorMessageId": "OMAG-COMMON-400-016", "exceptionErrorMessageParameters": [ "org.odpi.openmetadata.accessservices.analyticsmodeling.ffdc.exceptions.AnalyticsModelingCheckedException", "getModule", "OMAS-ANALYTICS-MODELING-003 Relationship AttributeForSchema for entity gen!RDBST@(host)=vottcteds4.canlab.ibm.com::(database)=adventworksDW::(database_schema)=dbo could not be fetched." ], "exceptionSystemAction": "The system is unable to process the request.", "exceptionUserAction": "Review the error message and other diagnostics created at the same time.", "errors" : [ { org.odpi.openmetadata.accessservices.analyticsmodeling.model.response.AnalyticsMessage }, ... ] }
    See Also:
    Serialized Form
    • Constructor Detail

      • ErrorResponse

        public ErrorResponse()
      • ErrorResponse

        public ErrorResponse​(AnalyticsModelingCheckedException source)
        Constructor initialized from exception thrown.
        Parameters:
        source - of the error.
    • Method Detail

      • getErrors

        public List<AnalyticsMessage> getErrors()
        Get the errors.
        Returns:
        the response errors.
      • setErrors

        protected void setErrors​(List<AnalyticsMessage> errors)
        Set response errors.
        Parameters:
        errors - response errors.
      • addError

        public void addError​(String messageId,
                             String httpStatus,
                             String message,
                             String detail)
        Add error to the response.
        Parameters:
        messageId - of the error.
        httpStatus - of the error.
        message - title.
        detail - of the error.