delete a cookie when wrong password is entered in devise

How do you have control (in this case deleting a cookie) after devise
has determined that a user has entered the wrong password in the
latest version of devise. I have my own custom failure app but cookies
are not accessible within it:

class CustomFailureApp < Devise::FailureApp

  def respond
    unless request.format.to_sym == :html
        flash[:alert] = i18n_message

        if request.subdomain == 'abc' && i18n_message.includes?
('Invalid login or password')
          cookies.delete :tracker_for_external_clients

          uri = URI(‘’)
          params = { ‘message’ => i18n_message }
          uri.query = URI.encode_www_form(params)

          res = Net::HTTP.get_response(uri)

          if res.is_a?(Net::HTTPSuccess)
   "The response is #{res.body}"
   "Something went wrong"

            redirect_to redirect_url