Closed
Description
The current response format varies between POST and GET calls. In one response, the data is returned under the message key, while in another, it is under the execution_result key.
{
"pending": false,
"execution_status": "COMPLETED",
"status_code": 200,
"message": [
{
"file": "Qualys_Quotation_Renewal_04-30-2024.pdf",
"status": "Success",
"result": {},
"metadata": {}
}
]
}
{
"pending": false,
"execution_status": "COMPLETED",
"error": null,
"extraction_result": [
{
"file": "Dup_Qualys_Quotation_Renewal_04-30-2024.pdf",
"status": "Success",
"result": {},
"metadata": {}
}
],
"status_code": 200
}
Requirements
- Standardize the response structure for both
POST
andGET
calls to ensure consistent key names. - Decide on a single key (e.g.,
execution_result
) for returning data and ensure both response types follow this format. - Update the
check_execution_status
function to return the standardized response structure.