ai-cfia / fertiscan-backend

Fertiscan backend
MIT License
1 stars 0 forks source link

As a dev team, we want to ensure robust error handling and JSON validation for our backend services. #71

Open Endlessflow opened 1 week ago

Endlessflow commented 1 week ago

As a dev team, we want to ensure robust error handling and JSON validation for our backend services.

Context:

Currently, our backend services rely on two external services during the analysis route: Document Intelligence and Azure OpenAI (GPT-4). Failures in these services can lead to unhandled errors, invalid data, and potential system instability. We need to ensure that our backend can gracefully handle service unavailability, failures, and invalid data responses. Additionally, it's crucial to validate the JSON output from our processing pipeline to ensure it meets the required structure and fields before sending it to the frontend.

Child Issues:

Acceptance criteria:

snakedye commented 3 days ago

It seems like Pydantic as is already handles the edge cases of a JSON extra keys or missing keys.