central-error-codes
Version:
Centralized error codes for SDK
123 lines (122 loc) • 3.98 kB
JSON
{
"P1_INITIALIZATION_ERROR": {
"errorCode": "P1_INITIALIZATION_ERROR",
"statusCode": 500,
"errorMessage": "Error initializing system components"
},
"P1_CREATE_FAILED": {
"errorCode": "P1_CREATE_FAILED",
"statusCode": 500,
"errorMessage": "Failed to create resource"
},
"P2_JWT_VALIDATION_ERROR": {
"errorCode": "P2_JWT_VALIDATION_ERROR",
"statusCode": 400,
"errorMessage": "JWT token validation failed due to invalid or expired token"
},
"P2_KAFKA_ERROR": {
"errorCode": "P2_KAFKA_ERROR",
"statusCode": 500,
"errorMessage": "Kafka processing encountered an error"
},
"P2_KAFKA_INIT_ERROR": {
"errorCode": "P2_KAFKA_INIT_ERROR",
"statusCode": 500,
"errorMessage": "Failed to initialize Kafka producer or consumer"
},
"P2_KAFKA_MSG_PROCESS_ERROR": {
"errorCode": "P2_KAFKA_MSG_PROCESS_ERROR",
"statusCode": 500,
"errorMessage": "Error while processing a Kafka message"
},
"P2_KAFKA_UNEXPECTED_ERROR": {
"errorCode": "P2_KAFKA_UNEXPECTED_ERROR",
"statusCode": 500,
"errorMessage": "An unexpected error occurred during Kafka processing"
},
"P2_JSON_PARSING_ERROR": {
"errorCode": "P2_JSON_PARSING_ERROR",
"statusCode": 400,
"errorMessage": "Failed to parse JSON due to invalid syntax or structure"
},
"P2_FETCH_ERROR": {
"errorCode": "P2_FETCH_ERROR",
"statusCode": 500,
"errorMessage": "Error fetching data from the source"
},
"P2_DELETE_FAILED": {
"errorCode": "P2_DELETE_FAILED",
"statusCode": 500,
"errorMessage": "Failed to delete the requested resource"
},
"P2_UPDATE_FAILED": {
"errorCode": "P2_UPDATE_FAILED",
"statusCode": 500,
"errorMessage": "Failed to update the requested resource"
},
"P2_ERROR_GENERATING_TOKEN": {
"errorCode": "P2_ERROR_GENERATING_TOKEN",
"statusCode": 500,
"errorMessage": "Error occurred while generating authentication token"
},
"P2_JSON_PROCESSING_ERROR": {
"errorCode": "P2_JSON_PROCESSING_ERROR",
"statusCode": 500,
"errorMessage": "Failed to process JSON data correctly"
},
"P2_INVALID_FORMAT_ERROR": {
"errorCode": "P2_INVALID_FORMAT_ERROR",
"statusCode": 400,
"errorMessage": "Input format is invalid or not supported"
},
"P2_INVALID_DATE_FORMAT": {
"errorCode": "P2_INVALID_DATE_FORMAT",
"statusCode": 400,
"errorMessage": "Provided date format is incorrect or not supported"
},
"P2_PROCESSING_ERROR": {
"errorCode": "P2_PROCESSING_ERROR",
"statusCode": 500,
"errorMessage": "A general processing error occurred"
},
"P2_HTTP_ERROR": {
"errorCode": "P2_HTTP_ERROR",
"statusCode": 500,
"errorMessage": "An HTTP request error occurred, possibly due to connectivity issues"
},
"P2_REQUEST_ERROR": {
"errorCode": "P2_REQUEST_ERROR",
"statusCode": 400,
"errorMessage": "The request is invalid or malformed"
},
"P2_UNKNOWN_ERROR": {
"errorCode": "P2_UNKNOWN_ERROR",
"statusCode": 500,
"errorMessage": "An unknown error occurred"
},
"P1_MINIO_INIT_ERROR": {
"errorCode": "P1_MINIO_INIT_ERROR",
"statusCode": 500,
"errorMessage": "Failed to initialize MinIO storage"
},
"P2_GLOBAL_EXCEPTION": {
"errorCode": "P2_GLOBAL_EXCEPTION",
"statusCode": 500,
"errorMessage": "Unhandled global exception occurred"
},
"P2_FILE_PROCESSING_ERROR": {
"errorCode": "P2_FILE_PROCESSING_ERROR",
"statusCode": 500,
"errorMessage": "Error processing the file"
},
"P2_QDRANT_CONNECTION_ERROR": {
"errorCode": "P2_QDRANT_CONNECTION_ERROR",
"statusCode": 500,
"errorMessage": "Error Connecting to the Qdrant instance"
},
"P2_QDRANT_ERROR": {
"errorCode": "P2_QDRANT_ERROR",
"statusCode": 500,
"errorMessage": "Unexpected response from Qdrant"
}
}