Sha256: f0a14bc950f51702c404db24d106f145262586ca91270c9339751d3fde2876d2
Contents?: true
Size: 578 Bytes
Versions: 13
Compression:
Stored size: 578 Bytes
Contents
module RakutenWebService class Error < StandardError def self.register(status_code, error) repository[status_code] = error end def self.repository @repository ||= {} end end class WrongParameter < Error; end Error.register(400, WrongParameter) class NotFound < Error; end Error.register(404, NotFound) class TooManyRequests < Error; end Error.register(429, TooManyRequests) class SystemError < Error; end Error.register(500, SystemError) class ServiceUnavailable < Error; end Error.register(503, ServiceUnavailable) end
Version data entries
13 entries across 13 versions & 1 rubygems