Commit 76e8e6a
committed
Change Elasticsearch timeouts to 429 response instead of 500
When a user passes a timeout to an Elasticsearch request, the user is
telling the system to limit how long the request should take. If that
timeout is breached, it is because the user selected a timeout less than
the time the request needs. Therefore, it is up to the user to select a
long enough time. If they don't, it's on the user to adjust their
request.
Given the above, a breached timeout is an issue with the user request,
and the http response code should refelect that. This commit changes
timeout exceptions to give a 429 response code instead of the default
500.1 parent 3cbbcc5 commit 76e8e6a
File tree
1 file changed
+7
-0
lines changed- server/src/main/java/org/elasticsearch
1 file changed
+7
-0
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
0 commit comments