Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-1204

QueryPlanningFailureException is not returned

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • .backlog3.x
    • None
    • None
    • None
    • 1

    Description

      In a test with no Indexes QueryPlanningFailure error was thrown however Python SDK raised it as a CouchbaseException as oppose to QueryPlanningFailureException

      Enhance the code to return a QueryPlanningFailureException

       
      couchbase.exceptions.CouchbaseException: <RC=0x191[LCB_ERR_PLANNING_FAILURE (401)], HTTP Request failed. Examine 'objextra' for full result, Results=1, C Source=(src/pycbc_http.c,203), OBJ=ViewResult<rc=0x191[LCB_ERR_PLANNING_FAILURE (401)], value={'requestID': '68726171-42e2-4bf6-a865-2e6a6866230e', 'clientContextID': '8e4f9f28cd731c80', 'errors': [{'code': 4000, 'msg': 'No index available on keyspace `default`:`beer-sample` that matches your query. Use CREATE PRIMARY INDEX ON `default`:`beer-sample` to create a primary index, or check that your expected index is online.'}], 'status': 'fatal'}, http_status=0, tracing_context=0, tracing_output=None>, Context={'first_error_code': 4000, 'http_response_code': 404, 'first_error_message': 'No index available on keyspace `default`:`beer-sample` that matches your query. Use CREATE PRIMARY INDEX ON `default`:`beer-sample` to create a primary index, or check that your expected index is online.', 'statement': 'SELECT * FROM `beer-sample` LIMIT 1;', 'client_context_id': '8e4f9f28cd731c80', 'query_params': '', 'http_response_body': '', 'endpoint': 'localhost:8093', 'type': 'QueryErrorContext'}, Tracing Output={":nokey:0": null}>

      Attachments

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

        Activity

          People

            jared.casey Jared Casey
            arun.vijayraghavan Arun Vijayraghavan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty