class Doorkeeper::OAuth::ErrorResponse

def self.exception_class_for(error)

def self.exception_class_for(error)
  return error if error.respond_to?(:name_for_response)
  "Doorkeeper::Errors::#{error.to_s.classify}".safe_constantize
end