module PactBroker::Errors

Public Class Methods

generate_error_reference() click to toggle source
# File lib/pact_broker/errors.rb, line 5
def self.generate_error_reference
  SecureRandom.urlsafe_base64.gsub(/[^a-z]/i, "")[0,10]
end
reportable_error?(error) click to toggle source

Return true if the error is one that should be reported to an external bug tracking system @return [Boolean]

# File lib/pact_broker/errors.rb, line 11
def self.reportable_error?(error)
  error.is_a?(PactBroker::TestError) || (!error.is_a?(PactBroker::Error) && !error.is_a?(JSON::JSONError))
end