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.
24 lines
684 B
24 lines
684 B
8 years ago
|
# frozen_string_literal: true
|
||
|
|
||
|
module Mastodon
|
||
|
class Error < StandardError; end
|
||
8 years ago
|
class NotPermittedError < Error; end
|
||
|
class ValidationError < Error; end
|
||
7 years ago
|
class HostValidationError < ValidationError; end
|
||
7 years ago
|
class LengthValidationError < ValidationError; end
|
||
7 years ago
|
class DimensionsValidationError < ValidationError; end
|
||
4 years ago
|
class StreamValidationError < ValidationError; end
|
||
8 years ago
|
class RaceConditionError < Error; end
|
||
5 years ago
|
class RateLimitExceededError < Error; end
|
||
8 years ago
|
|
||
|
class UnexpectedResponseError < Error
|
||
|
def initialize(response = nil)
|
||
8 years ago
|
if response.respond_to? :uri
|
||
|
super("#{response.uri} returned code #{response.code}")
|
||
|
else
|
||
|
super
|
||
|
end
|
||
8 years ago
|
end
|
||
|
end
|
||
8 years ago
|
end
|