2016-12-23 05:34:19 +09:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Mastodon
|
|
|
|
class Error < StandardError; end
|
2017-02-27 07:23:06 +09:00
|
|
|
class NotPermittedError < Error; end
|
|
|
|
class ValidationError < Error; end
|
2017-04-04 05:54:46 +09:00
|
|
|
class RaceConditionError < Error; end
|
2017-07-20 08:59:07 +09:00
|
|
|
|
|
|
|
class UnexpectedResponseError < Error
|
|
|
|
def initialize(response = nil)
|
|
|
|
@response = response
|
|
|
|
end
|
|
|
|
|
|
|
|
def to_s
|
|
|
|
"#{@response.uri} returned code #{@response.code}"
|
|
|
|
end
|
|
|
|
end
|
2016-12-23 05:34:19 +09:00
|
|
|
end
|