Commit c0d398f4 authored by nextime's avatar nextime

Improve JSON response validation and increase timeout to 45 seconds

- Increase main timeout to 45 seconds as requested for complete response detection
- Add strict JSON validation requiring both 'response' and 'id' keys
- Implement isCompleteValidJson() function to ensure JSON completeness
- Only return responses when JSON is complete and valid
- Add enhanced logging for debugging partial matches
- Prevent premature response extraction from incomplete JSON
- Add safety timeout at 60 seconds to prevent hanging
- Improve observer logic to only resolve on complete, valid JSON

This ensures the API only serves responses when we have complete,
valid JSON with both required keys, preventing partial or corrupted responses.
parent 41cc9c97
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment