logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

exceptions.rb (530B)


  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 RaceConditionError < Error; end
  9. class UnexpectedResponseError < Error
  10. def initialize(response = nil)
  11. if response.respond_to? :uri
  12. super("#{response.uri} returned code #{response.code}")
  13. else
  14. super
  15. end
  16. end
  17. end
  18. end