Skip to content

Commit d078f88

Browse files
committed
Fix 406 Client Error: Not Acceptable errors in test suite
There is a test case which validates that the HTTP client croaks appropriately when connecting to non-CrateDB servers. Within that test, we used http://crate.io to connect to. However, it looks like Fastly now blocks excessive requests to that domain, for example when running the test matrix on CI, which invokes quite a number of requests. > By default, the Signal Sciences agent returns a “406” response code when a request is blocked (similar to an HTTP 406 NOT ACCEPTABLE response). > > -- https://docs.fastly.com/signalsciences/faq/response-codes/#what-is-a-406-agent-response-code
1 parent 80cefb3 commit d078f88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/crate/client/doctests/http.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ an exception is raised when the timeout is reached::
183183

184184
When connecting to non Crate servers the HttpClient will raise a ConnectionError like this::
185185

186-
>>> http_client = HttpClient(["https://crate.io"])
186+
>>> http_client = HttpClient(["https://httpbin.org/html"])
187187
>>> http_client.server_infos(http_client._get_server())
188188
Traceback (most recent call last):
189189
...
190-
crate.client.exceptions.ProgrammingError: Invalid server response of content-type 'text/html; charset=UTF-8':
190+
crate.client.exceptions.ProgrammingError: Invalid server response of content-type 'text/html; charset=utf-8':
191191
...
192192

193193
When using the ``error_trace`` kwarg a full traceback of the server exception

0 commit comments

Comments
 (0)