Sha256: 42813123828389254ad947f2c5a05e78c41ca7bce1ff3f3571572e3ad5821f5a
Contents?: true
Size: 599 Bytes
Versions: 8
Compression:
Stored size: 599 Bytes
Contents
require "digicert/config" module Digicert module Errors class RequestError < StandardError def initialize(msg = {}) @msg = msg super msg end def message <<-MSG.gsub(/^ {8}/, "") #{explanation}: #{response_body} MSG end def explanation "A request to Digicert API failed" end def kind response_body.fetch("code", {}) end private attr_reader :msg def response_body JSON[msg] rescue {} end end end Error = Errors::RequestError end
Version data entries
8 entries across 8 versions & 1 rubygems