You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: with_error_type_based_dispatcher_spec.rb
    path of file: ./repos/karafka/spec/integrations/pro/consumption/strategies/aj/dlq_mom
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# Com
    
  def call(errors_tracker, attempt)
    DT[:errors] << [errors_tracker.last&.class, attempt]

    case errors_tracker.last
    # Always retry on any DB related errors
    when DbError
      :retry
    # Never retry on non-recoverable errors
    when NonRecoverableError
      :skip
    # On this specific recoverable retry at most 2 times
    when RecoverableError
      attempt > 2 ? :dispatch : :retry
    else
      # And for any other errors, retry 5 times
      attempt > 5 ? :dispatch : :retry
    end