Sha256: 02020c28d0fc8e11a9e6e992fd50ac7342f368478df9b1f97ceb11d0fc5b0001

Contents?: true

Size: 893 Bytes

Versions: 13

Compression:

Stored size: 893 Bytes

Contents

module BacklogKit
  class Error < StandardError
    def self.build_error_message(response, index)
      message = "[ERROR #{index}] "
      message += "#{self.name.demodulize} - #{response['message']} (CODE: #{response['code']})"
      more_info = response['moreInfo'].to_s
      message += " (MORE INFO: #{more_info})" unless more_info.empty?
      message
    end
  end

  class ConnectionError < Error; end
  class UnexpectedError < Error; end
  class InternalError < Error; end
  class LicenceError < Error; end
  class LicenceExpiredError < Error; end
  class AccessDeniedError < Error; end
  class UnauthorizedOperationError < Error; end
  class NoResourceError < Error; end
  class InvalidRequestError < Error; end
  class SpaceOverCapacityError < Error; end
  class ResourceOverflowError < Error; end
  class TooLargeFileError < Error; end
  class AuthenticationError < Error; end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
backlog_kit-0.12.1 lib/backlog_kit/error.rb
backlog_kit-0.12.0 lib/backlog_kit/error.rb
backlog_kit-0.11.0 lib/backlog_kit/error.rb
backlog_kit-0.10.0 lib/backlog_kit/error.rb
backlog_kit-0.9.0 lib/backlog_kit/error.rb
backlog_kit-0.8.0 lib/backlog_kit/error.rb
backlog_kit-0.7.0 lib/backlog_kit/error.rb
backlog_kit-0.6.0 lib/backlog_kit/error.rb
backlog_kit-0.5.0 lib/backlog_kit/error.rb
backlog_kit-0.4.0 lib/backlog_kit/error.rb
backlog_kit-0.3.0 lib/backlog_kit/error.rb
backlog_kit-0.2.0 lib/backlog_kit/error.rb
backlog_kit-0.1.0 lib/backlog_kit/error.rb