Repository navigation
Conversation
|
Thanks; I agree that the bulk response can be difficult to diagnose because the outer HTTP status remains as I'm not sure this should be logged at Maybe we instead add a What do you think, @lo-simon ? |
handle_connection_resource_patch is shared with PATCH /single, which already logs "Route not found", so log the not found case only in the /bulk handler, where the outer status stays 200 OK, and at more_info like other ordinary 404 cases.
|
Thanks @garethsb, that makes sense, I had missed that the helper is shared with /single and that it would duplicate the "Route not found" log there. In b120722 I removed the warning from handle_connection_resource_patch and instead log at more_info in the /bulk handler when an item comes back as NotFound, including its id_type ("Resource not found for sender: in bulk request"). So /single is unchanged and the /bulk case gets a single message. Happy to adjust the wording or level if @lo-simon prefers something else. |
Move the more_info log into the try block right after handle_connection_resource_patch, since only that call returns these codes, and also log a Conflict result.
|
Thanks @lo-simon, done in b381d3a. The log now sits inside the try block right after |
|
@lo-simon Would it be odd that we'd log nmos-cpp/Development/nmos/connection_api.cpp Lines 531 to 533 in b381d3a nmos-cpp/Development/nmos/connection_api.cpp Lines 544 to 546 in b381d3a nmos-cpp/Development/nmos/connection_api.cpp Lines 552 to 554 in b381d3a whereas for the single nmos-cpp/Development/nmos/api_utils.cpp Lines 569 to 572 in b381d3a I'm trying to think why |
|
Happy to go either way here. I can move the NotFound and Conflict logging into |
A PATCH in a
/bulkconnection request for an unknown sender or receiver id is answered with a 404 inside the 200 OK bulk response, but nothing was logged, so it was hard to tell from the logs why an item failed. A/singlerequest already logs the generic "Route not found".This logs a
more_infomessage with the id and type in the/bulkhandler when an item comes back as NotFound, leavingdetails::handle_connection_resource_patchand the/singlepath unchanged.Fixes #522