Skip to content

Commit

Permalink
Merge pull request #1020 from sul-dlss/catch-faraday
Browse files Browse the repository at this point in the history
Catch Faraday errors
  • Loading branch information
corylown authored Dec 20, 2023
2 parents 53d4a37 + fbf96cc commit aa6cfef
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/services/folio_client.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require 'http'

# Calls FOLIO REST endpoints
class FolioClient
class IlsError < StandardError; end
Expand Down Expand Up @@ -77,7 +75,7 @@ def patron_account(patron_key, item_details: {})

def ping
session_token.present?
rescue HTTP::Error, FolioClient::IlsError
rescue Faraday::Error, FolioClient::IlsError
false
end

Expand Down

0 comments on commit aa6cfef

Please sign in to comment.