Merge pull request #1768 from betagouv/add-comment
Add a comment to explain why we reject 206 responses
This commit is contained in:
commit
feeb0cc80b
1 changed files with 3 additions and 0 deletions
|
@ -38,6 +38,9 @@ class ApiEntreprise::API
|
||||||
params: params,
|
params: params,
|
||||||
timeout: TIMEOUT)
|
timeout: TIMEOUT)
|
||||||
|
|
||||||
|
# Responses with a 206 codes are sometimes not useable,
|
||||||
|
# as the RNA calls often return a 206 with an error message,
|
||||||
|
# not a partial response
|
||||||
if response.success? && response.code != 206
|
if response.success? && response.code != 206
|
||||||
JSON.parse(response.body, symbolize_names: true)
|
JSON.parse(response.body, symbolize_names: true)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue