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

Creating error codes for common FTS errors

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Done
    • 6.6.0
    • 7.0.0
    • fts
    • None
    • 1

    Description

      Associating the FTS error messages with the internal error codes. Similar to what we have for N1QL  https://docs.couchbase.com/server/current/n1ql/n1ql-language-reference/n1ql-error-codes.html

       

      Attachments

        Issue Links

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

          Activity

            FTS sets errors codes in the HTTP response header already as of 6.5 (which needs to documented).

            Here's details ..

             

            FTS error status Error description HTTP response status code HTTP response status description
            success Query was processed successfully 200 OK
            query request rejected Seen when the FTS throttler rejects the query due to high memory usage 429 Too Many Requests
            authentication failure Seen when the auth credentials provided do not qualify. 403 Forbidden
            malformed query request Seen when the search request JSON isn't an recognized format 400 Bad Request
            internal failure Seen when FTS is unable to fetch any necessary data for responding to the request 500 Internal Server Error
            page not found When the endpoint for the request doesn't exist 404 Not Found
            pre condition failed When a pre-condition (like a consistency error) has occurred 412 Precondition Failed
            context deadline exceeded Seen when FTS fails to respond to the request within the set timeout period - -

            For when FTS fails to respond to the request within the set the timeout period, you'd see a message in the search result like this ..

              "status": {
                "total": 6,
                "failed": 6,
                "successful": 0,
                "errors": {
                  "travel_5563340761e0e2a7_13aa53f3": "context deadline exceeded",
                  "travel_5563340761e0e2a7_18572d87": "context deadline exceeded",
                  "travel_5563340761e0e2a7_54820232": "context deadline exceeded",
                  "travel_5563340761e0e2a7_6ddbfb54": "context deadline exceeded",
                  "travel_5563340761e0e2a7_aa574717": "context deadline exceeded",
                  "travel_5563340761e0e2a7_f4e0a48a": "context deadline exceeded"
                }
              }, 

            However, the HTTP response code isn't set (in the above situation) as the response header is sent immediately and FTS fails to get results to put in the response body within the specified time frame - which is when the above response snippet is sent.

             

            abhinav Abhinav Dangeti added a comment - FTS sets errors codes in the HTTP response header already as of 6.5 (which needs to documented). Here's details ..   FTS error status Error description HTTP response status code HTTP response status description success Query was processed successfully 200 OK query request rejected Seen when the FTS throttler rejects the query due to high memory usage 429 Too Many Requests authentication failure Seen when the auth credentials provided do not qualify. 403 Forbidden malformed query request Seen when the search request JSON isn't an recognized format 400 Bad Request internal failure Seen when FTS is unable to fetch any necessary data for responding to the request 500 Internal Server Error page not found When the endpoint for the request doesn't exist 404 Not Found pre condition failed When a pre-condition (like a consistency error) has occurred 412 Precondition Failed context deadline exceeded Seen when FTS fails to respond to the request within the set timeout period - - For when FTS fails to respond to the request within the set the timeout period, you'd see a message in the search result like this .. "status" : { "total" : 6 , "failed" : 6 , "successful" : 0 , "errors" : { "travel_5563340761e0e2a7_13aa53f3" : "context deadline exceeded" , "travel_5563340761e0e2a7_18572d87" : "context deadline exceeded" , "travel_5563340761e0e2a7_54820232" : "context deadline exceeded" , "travel_5563340761e0e2a7_6ddbfb54" : "context deadline exceeded" , "travel_5563340761e0e2a7_aa574717" : "context deadline exceeded" , "travel_5563340761e0e2a7_f4e0a48a" : "context deadline exceeded" } }, However, the HTTP response code isn't set (in the above situation) as the response header is sent immediately and FTS fails to get results to put in the response body within the specified time frame - which is when the above response snippet is sent.  

            Correction, this is as of 5.5.0, see: MB-19263.

            Believe SDK also propagates the HTTP Status code that FTS returns to it to the client.

            abhinav Abhinav Dangeti added a comment - Correction, this is as of 5.5.0, see:  MB-19263 . Believe SDK also propagates the HTTP Status code that FTS returns to it to the client.
            mihir.kamdar Mihir Kamdar (Inactive) added a comment - - edited

            Closing this as we see these errors implicitly in various system and functional tests. There is no code change involved here.

            mihir.kamdar Mihir Kamdar (Inactive) added a comment - - edited Closing this as we see these errors implicitly in various system and functional tests. There is no code change involved here.

            People

              abhinav Abhinav Dangeti
              anusha.mathur Anusha Mathur
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty