Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-94388

Always return an error response to external clients when possible

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability
    • Networking & Obs 2024-09-30, Networking & Obs 2024-10-14, Networking & Obs 2024-10-28, Networking & Obs 2024-11-11

      In the router/shard service entry points, we catch any thrown exceptions, log a message, and then return a failed future. This in turn translates to closing the connection to the external client, rather than sending them back a readable message. This makes sense in some cases (e.g. when it hasn't been established that the client speaks the wire protocol), but in other cases we might be missing out on providing better error messaging (e.g. client attempted to speak the protocol but made an error). We should audit the exception handling in SEP to ensure we return responses wherever possible.

      https://github.com/10gen/mongo/blob/ebd06e3f1228e4174533922f5369c225511a1216/src/mongo/db/service_entry_point_shard_role.cpp#L2490-L2494

            Assignee:
            patrick.freed@mongodb.com Patrick Freed
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: