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

3.6 $jsonSchema validator error message improvements

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Trivial - P5 Trivial - P5
    • None
    • 3.6.0-rc4
    • None
    • None

    Description

      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?".

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: