lib/preservation/client.rb in preservation-client-3.2.1 vs lib/preservation/client.rb in preservation-client-3.3.0

- old
+ new

@@ -15,16 +15,21 @@ module Preservation # REST API client wrapper for PreservationCatalog with error handling class Client class Error < StandardError; end - # Error that is raised when the remote server returns a 404 Not Found + # Error raised when server returns 404 Not Found class NotFoundError < Error; end - # Error that is raised when the remote server returns some unexpected response - # e.g. 4xx or 5xx status + # Error raised when server returns 423 Locked + class LockedError < Error; end + + # Error raised when server returns an unexpected response + # e.g., 4xx or 5xx status not otherwise handled class UnexpectedResponseError < Error; end + # Error raised when Faraday gem fails to connect, e.g., on SSL errors or + # timeouts class ConnectionFailedError < Error; end DEFAULT_API_VERSION = 'v1' TOKEN_HEADER = 'Authorization'