Treat partial success from api entreprises as errors
We might refine this later, but for now this will give an error instead of unspecified state
This commit is contained in:
parent
d72e0e92a9
commit
2505419b08
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ class ApiEntreprise::API
|
||||||
params: params,
|
params: params,
|
||||||
timeout: 20)
|
timeout: 20)
|
||||||
|
|
||||||
if response.success?
|
if response.success? && response.code != 206
|
||||||
JSON.parse(response.body, symbolize_names: true)
|
JSON.parse(response.body, symbolize_names: true)
|
||||||
else
|
else
|
||||||
raise RestClient::ResourceNotFound
|
raise RestClient::ResourceNotFound
|
||||||
|
|
Loading…
Reference in a new issue