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

CBO Analyze: Improve error message if sample value is invalid

    XMLWordPrintable

Details

    • 0
    • Yes
    • Analytics CBO Sprint 14, Analytics CBO Sprint 15

    Description

      To repro: RUN QUERY ANALYZE ANALYTICS COLLECTION airline WITH {"sample":"large"} ;

       

      2023-02-23 14:52:42 | INFO | MainProcess | test_thread | [tuq.run_cbq_query] RUN QUERY ANALYZE ANALYTICS COLLECTION airline WITH {"sample":"large"}
      2023-02-23 14:52:44 | ERROR | MainProcess | test_thread | [on_prem_rest_client._http_request] POST http://172.23.104.91:8095/analytics/service body: {"statement": "ANALYZE ANALYTICS COLLECTION airline WITH {\"sample\":\"large\"};", "pretty": true, "client_context_id": null, "mode": "immediate"} headers: {'Content-Type': 'application/json', 'Authorization': 'Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==', 'Accept': '*/*'} error: 400 reason: unknown b'{\n\t"requestID": "0e8bdf59-c4ef-4a3a-94ed-358fad2b3129",\n\t"clientContextID": "null",\n\t"errors": [{ \n\t\t"code": 24102,\t\t"msg": "Invalid format for property \'sample\'"\t} \n\t],\n\t"status": "fatal",\n\t"metrics": {\n\t\t"elapsedTime": "2.129487733s",\n\t\t"executionTime": "2.126735789s",\n\t\t"resultCount": 0,\n\t\t"resultSize": 0,\n\t\t"processedObjects": 0,\n\t\t"errorCount": 1\n\t}\n}\n' auth: Administrator:password 

      I would expect a better error message with prescription e.g. valid values. 

      Attachments

        Issue Links

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

          Activity

            People

              umang.agrawal Umang
              pierre.regazzoni Pierre Regazzoni
              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