module Restforce::ErrorCode
def self.get_exception_class(error_code)
def self.get_exception_class(error_code) ERROR_EXCEPTION_CLASSES.fetch(error_code) do |_| warn "[restforce] An unrecognised error code, `#{error_code}` has been " \ "received from Salesforce. Instead of raising an error-specific exception" \ ", we'll raise a generic `ResponseError`. Please report this missing " \ "error code on GitHub at <#{GITHUB_ISSUE_URL}>." # If we've received an unexpected error where we don't have a specific # class defined, we can return a generic ResponseError instead ResponseError end end