Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-1095

View error contents parsed incorrectly

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • core-10.0.0, core-9.1.5
    • None
    • None
    • 1

    Description

      		if err := json.Unmarshal(respBody, &errsArr); err != nil {
      			errorDescs = make([]ViewQueryErrorDesc, len(errsArr))
      			for errIdx, errMessage := range errsArr {
      				errorDescs[errIdx] = ViewQueryErrorDesc{
      					SourceNode: "",
      					Message:    errMessage,
      				}
      			}
      		} else if err := json.Unmarshal(respBody, &errsMap); err != nil {
      			for errNode, errMessage := range errsMap {
      				errorDescs = append(errorDescs, ViewQueryErrorDesc{
      					SourceNode: errNode,
      					Message:    errMessage,
      				})
      			}
      		}
      

      These checks should both be `err == nil`

      Attachments

        Issue Links

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

          Activity

            Build couchbase-server-7.1.0-2094 contains gocbcore commit e8b9126 with commit message:
            GOCBC-1095: Check for nil error when parsing view errors

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-2094 contains gocbcore commit e8b9126 with commit message: GOCBC-1095 : Check for nil error when parsing view errors

            Build sync_gateway-3.0.0-225 contains gocbcore commit 2dd22c1 with commit message:
            GOCBC-1095: Check for nil error when parsing view errors

            build-team Couchbase Build Team added a comment - Build sync_gateway-3.0.0-225 contains gocbcore commit 2dd22c1 with commit message: GOCBC-1095 : Check for nil error when parsing view errors

            People

              charles.dixon Charles Dixon
              charles.dixon Charles Dixon
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty