ErrorData Class
Overview
The ErrorData
case class is a part of the org.sunbird.obsrv.job.model.Models
package. It encapsulates error information, including an error code and an error message, which can be used to provide detailed error reporting and handling within the application.
Class Definition
Fields
errorCode: String
errorCode: String
Description: The unique code representing the specific error.
Annotations:
@JsonProperty("error_code")
errorMsg: String
errorMsg: String
Description: A descriptive message providing details about the error.
Annotations:
@JsonProperty("error_msg")
Usage
The ErrorData
case class is used to encapsulate error information that can be serialized and deserialized to and from JSON. It provides a structured way to represent errors in the application.
Example
JSON Representation
An instance of ErrorData
can be serialized to JSON as follows:
Last updated