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

3.6 $jsonSchema validator error message improvements

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: 3.6.0-rc4
    • Component/s: None
    • None

      When a document fails validation from a prescribed schema a WriteError is generated with a

      {{"code": 121,
      "errmsg" : "Document failed validation"}}

      message. It would be great if the error message would be more explicit as to why the write failed, i.e. which rule was violated. Or, allow for an error parameter to be included in the schema validation rules to allow for custom messaging if a rule is violated, i.e. error: "Are you sure that you are passing in an 'int' value?".

            Assignee:
            Unassigned Unassigned
            Reporter:
            kenwalger Ken W. Alger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: