Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-21551

[FTS] improve JSON parsing error message

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • feature-backlog
    • 4.5.1
    • fts
    • None
    • Untriaged
    • Unknown

    Description

      If you pass in the wrong type of information, for example, trying to pass an array in where an object is expected you get something like:

      json: cannot unmarshal array into Go value of type map[string]interface {}
      

      This doesn't make much sense to the end users. A better message would include which field was the source of the problem, and user JSON type terminology instead of Go terminology.

      Unfortunately, I don't see a way to do that without writing our own parser.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            steve Steve Yen
            mschoch Marty Schoch [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty