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

Make error reporting consistent whenever throwing an exception in a Command

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.4
    • Component/s: Security, Usability
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change

      Description

      Right now, if you throw a UserAssertion in the body of a command, the result object you get back from the command looks like:
      {ok: 0,
      code: <assertion code>,
      errmsg: <assertion message>
      }

      If you throw an exception from some other part of the command code other than the run method (for example in the access control check or the parseNs method), you get back something like:
      {ok: 0,
      assertionCode: <assertion code>,
      assertion: <assertion message>,
      errmsg: "db assertion failure"
      }

      We should make these consistent

        Attachments

          Activity

            People

            Assignee:
            spencer Spencer Brody (Inactive)
            Reporter:
            spencer Spencer Brody (Inactive)
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: