twenty
twenty copied to clipboard
400 instead of 500 for query read timeout
A client reported that they ran the following request:
{
"url": "https://api.twenty.com/rest/companies?filter=updatedAt%5Bgte%5D%3A%222021-06-01T00%3A00%3A00.000000Z%22",
"headers": {
"User-Agent": "python-requests/2.32.3",
"Accept-Encoding": "gzip, deflate",
"Accept": "*/*",
"Connection": "keep-alive",
"Authorization": "Bearer ****"
},
"http_method": "GET",
"body": ""
}
And got the following error:
{
"status": 400,
"body": {
"statusCode": 400,
"message": "Query read timeout",
"error": "Bad Request"
},
"headers": {
"Date": "Wed, 10 Jul 2024 05:26:42 GMT",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "71",
"Connection": "keep-alive",
"X-Powered-By": "Express",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET,HEAD,PUT,PATCH,POST,DELETE",
"Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept",
"ETag": "W/\"47-XdAOEIsvUz8giAnu75HoLvsXodw\"",
"CF-Cache-Status": "DYNAMIC",
"Server": "cloudflare",
"CF-RAY": "8a0e2394bee75309-SLC",
"alt-svc": "h3=\":443\"; ma=86400"
}
}
This didn't appear in Sentry. This should have been a 500 not a 400 as the request is correct. Where could this come from @charlesBochet?