This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2016-12-22 12:34:19 -08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Mastodon
|
|
|
|
class Error < StandardError; end
|
2017-02-26 14:23:06 -08:00
|
|
|
class NotPermittedError < Error; end
|
|
|
|
class ValidationError < Error; end
|
2018-02-24 10:16:11 -08:00
|
|
|
class HostValidationError < ValidationError; end
|
2017-04-03 13:54:46 -07:00
|
|
|
class RaceConditionError < Error; end
|
2017-07-19 16:59:07 -07:00
|
|
|
|
|
|
|
class UnexpectedResponseError < Error
|
|
|
|
def initialize(response = nil)
|
2017-07-26 15:38:20 -07:00
|
|
|
if response.respond_to? :uri
|
|
|
|
super("#{response.uri} returned code #{response.code}")
|
|
|
|
else
|
|
|
|
super
|
|
|
|
end
|
2017-07-19 16:59:07 -07:00
|
|
|
end
|
|
|
|
end
|
2016-12-22 12:34:19 -08:00
|
|
|
end
|