Mistři v programování na #hovnokod

Ruby #324

begin
    # etc
  rescue Exception => e
    case e
      when LinkedIn::Unauthorized
        account.invalidate_token if !account.invalid_token?
        raise InvalidTokenException.new(account.primary, provider_name)
      when LinkedIn::InformLinkedIn, LinkedIn::Unavailable  #LinkedIn::Unavailable represents 502..503 error codes & LinkedIn::InformLinkedIn represent 500
        raise UnexpectedApiException.new(provider_name)
      else
        handle_api_exception(e, e.message)
    end
  end

HovnoKod,