method

set_context

set_context(...)
public

Update the execution context that is accessible to error subscribers

Rails.error.set_context(section: "checkout", user_id: @user.id)

See +ActiveSupport::ExecutionContext.set+