The API not existing in the first place (e.g., https://fakeapi.org/) - this is a problem with the request
The API existing but is down or there is some other issue that causes a failure response code
TODO:
[x] write a test with two stubbed node-APIs, one of which responds successfully, and the other with an error. assert that the successful response makes it through
[x] write a test as above, but the "bad" node-API doesn't react / times out / is unreachable
[x] when a request partially succeeds, the API response should return:
[x] A response body containing the query results for the nodes that responded successfully, and also the errors from the nodes that failed (e.g., {"errors": {"node_name": ..., "error": ...}, "responses": ..., "nodes_response_status": ...})
[x] use above response body template for all federated query responses, changing the status key as needed, including when requests to all nodes fail (use 207 status as well)
[x] log to console when >=1 APIs do not respond with success, with the;
[x] URL of the API that failed
[x] error message from the API/request, as a warning
[x] always print (info) to console if all nodes succeeded, or if some failed (e.g., 2/3)
[x] do programming stuff to make the tests pass
[x] switch to sending requests to node APIs asynchronously using asyncio
This could be due to the:
https://fakeapi.org/
) - this is a problem with the requestTODO:
{"errors": {"node_name": ..., "error": ...}, "responses": ..., "nodes_response_status": ...}
)