闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
631 B

  1. # frozen_string_literal: true
  2. module Mastodon
  3. class Error < StandardError; end
  4. class NotPermittedError < Error; end
  5. class ValidationError < Error; end
  6. class HostValidationError < ValidationError; end
  7. class LengthValidationError < ValidationError; end
  8. class DimensionsValidationError < ValidationError; end
  9. class RaceConditionError < Error; end
  10. class RateLimitExceededError < Error; end
  11. class UnexpectedResponseError < Error
  12. def initialize(response = nil)
  13. if response.respond_to? :uri
  14. super("#{response.uri} returned code #{response.code}")
  15. else
  16. super
  17. end
  18. end
  19. end
  20. end