Add a comment to explain why we reject 206 responses

This commit is contained in:
gregoirenovel 2018-03-29 15:36:41 +02:00
parent ba41190c32
commit cc9e318210

View file

@ -38,6 +38,9 @@ class ApiEntreprise::API
params: params,
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
JSON.parse(response.body, symbolize_names: true)
else