I want to know the status of my API call
when its success
.
begin
@project = Project.find( id: '22', authorization: @auth )
rescue ActiveRestClient::HTTPClientException, ActiveRestClient::HTTPServerException => e
Rails.logger.error("Project find returned #{e.status} #{e.message}")
end
When my API fails to get a project
with an id '22'
, i get the status
and the message as exception. But how can i get the status 200
when its a success
call.