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

Views REST interface should check if view is valid

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.5.0
    • 4.6.2
    • view-engine
    • None

    Description

      When uploading views from a Curl or client, the REST interface should return an error if the same view can not be created from the UI.

      example:

      function (doc, meta) {
       var comps = meta.id.split(".");
         if(comps.length > 1) {
             if(comps[0] == 'A' && comps[1]= 'B') {
                   emit(meta, doc.created)
             }
         }
      }
      

      from the UI has the error:

      Syntax error in the map function of the view `test': ReferenceError: Invalid left-hand side in assignment (line 4:10) 
      

      This will prevent invalid views from being loaded into the system.

      Attachments

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

        Activity

          People

            HarshaHS Harsha HS (Inactive)
            james.mauss James Mauss (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty