Details
Description
When a request is timed out, we return a response of 200 with an error message.
╰─$ curl --location --verbose 'http://localhost:9000/_p/cbas/analytics/service' \
|
--header 'Content-Type: application/x-www-form-urlencoded' \
|
--header 'Authorization: Basic Y291Y2hiYXNlOmNvdWNoYmFzZQ==' \
|
--data-urlencode 'timeout=1s' \
|
--data-urlencode 'statement=select count(*) from beers;'
|
* Host localhost:9000 was resolved.
|
* IPv6: ::1
|
* IPv4: 127.0.0.1
|
* Trying [::1]:9000...
|
* Connected to localhost (::1) port 9000
|
> POST /_p/cbas/analytics/service HTTP/1.1
|
> Host: localhost:9000
|
> User-Agent: curl/8.6.0-DEV
|
> Accept: */*
|
> Content-Type: application/x-www-form-urlencoded
|
> Authorization: Basic Y291Y2hiYXNlOmNvdWNoYmFzZQ==
|
> Content-Length: 56
|
>
|
< HTTP/1.1 200 OK
|
< Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
|
< Cache-Control: no-cache,no-store,must-revalidate
|
< Connection: keep-alive
|
< Content-Type: application/json; charset=UTF-8
|
< Date: Mon, 29 Apr 2024 09:29:49 GMT
|
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
|
< Pragma: no-cache
|
< Server: Couchbase Server
|
< Transfer-Encoding: chunked
|
< X-Content-Type-Options: nosniff
|
< X-Frame-Options: DENY
|
< X-Permitted-Cross-Domain-Policies: none
|
< X-XSS-Protection: 1; mode=block
|
<
|
{
|
"requestID": "deb8b7c3-8fe4-4973-89f1-18d4f53a759b",
|
"errors": [{
|
"code": 21002, "msg": "Request timed out and will be cancelled" }
|
],
|
"status": "timeout",
|
"metrics": {
|
"elapsedTime": "1.008836167s",
|
"executionTime": "1.007699042s",
|
"compileTime": "0ns",
|
"queueWaitTime": "0ns",
|
"resultCount": 0,
|
"resultSize": 0,
|
"processedObjects": 0,
|
"bufferCacheHitRatio": "0.00%",
|
"bufferCachePageReadCount": 0,
|
"errorCount": 1
|
}
|
}
|
* Leftovers after chunking: 12 bytes
|
* Connection #0 to host localhost left intact
|