This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2016-12-22 21:34:19 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Mastodon
|
|
|
|
class Error < StandardError; end
|
2017-02-26 23:23:06 +01:00
|
|
|
class NotPermittedError < Error; end
|
|
|
|
class ValidationError < Error; end
|
2017-04-03 22:54:46 +02:00
|
|
|
class RaceConditionError < Error; end
|
2017-07-20 01:59:07 +02:00
|
|
|
|
|
|
|
class UnexpectedResponseError < Error
|
|
|
|
def initialize(response = nil)
|
|
|
|
@response = response
|
|
|
|
end
|
|
|
|
|
|
|
|
def to_s
|
|
|
|
"#{@response.uri} returned code #{@response.code}"
|
|
|
|
end
|
|
|
|
end
|
2016-12-22 21:34:19 +01:00
|
|
|
end
|