Sha256: 7722d2bee0cc07dc0dbbd25c21c37b611f4422f2b7f766fe32178b966b5133b8
Contents?: true
Size: 790 Bytes
Versions: 16
Compression:
Stored size: 790 Bytes
Contents
# frozen_string_literal: true module DiscourseApi class DiscourseError < StandardError attr_reader :response def initialize(message, response = nil) super(message) @response = response end end class Error < DiscourseError attr_reader :wrapped_exception # Initializes a new Error object # # @param exception [Exception, String] # @return [DiscourseApi::Error] def initialize(exception = $!) @wrapped_exception = exception exception.respond_to?(:message) ? super(exception.message) : super(exception.to_s) end end class UnauthenticatedError < DiscourseError end class NotFoundError < DiscourseError end class UnprocessableEntity < DiscourseError end class TooManyRequests < DiscourseError end end
Version data entries
16 entries across 16 versions & 1 rubygems