class Doorkeeper::OAuth::ErrorResponse

def self.from_request(request, attributes = {})

def self.from_request(request, attributes = {})
  new(
    attributes.merge(
      name: error_name_for(request.error),
      exception_class: exception_class_for(request.error),
      state: request.try(:state),
      redirect_uri: request.try(:redirect_uri),
    ),
  )
end