lib/fizzy/api/calculate_outcome.rb in fizzy-api-0.0.2.1 vs lib/fizzy/api/calculate_outcome.rb in fizzy-api-0.0.2.2
- old
+ new
@@ -15,9 +15,11 @@
def process_response(response)
case response.code
when 200
response
+ when 202
+ fail Errors::OutcomeNotAvailableError, 'The results are currently being calculated.'
when 404
fail Errors::GraphNotFoundError, 'Participant not found, or graph not supported.'
else
fail Errors::UnexpectedStatusError, "Status code #{response.code} not expected."
end