anchor.diff:          {ok, _State4} = attempt_certification(State3)
       catch
           _:Error ->
  -            case ExistingAccount of
  +            case AccountExists of
                   true -> ok;
                   false ->
  -                    % if error occurred before any successful certification,
  -                    % account it is better to delete the account in order
  -                    % to prevent counting against invalid authorization rate limit
  +                    % if error occurred before current account has completed
  +                    % any successful certification, it can be safely
  +                    % deleted. This avoids counting against invalid
  +                    % authorization rate limit.
                       catch clean_keys(KeysDir)
               end,
               ?throw_stacktrace(Error, [Domain, Plugin, Mode])
  
positive.code: 
  -spec post(url(), Payload :: term(), OkCodes :: one_or_many(http_client:code()),
      #flow_state{}, Attempts :: non_neg_integer()) -> request_result() | no_return().
  post(URL, Payload, OkCode, State, Attempts)
      when is_integer(OkCode) ->
      post(URL, Payload, [OkCode], State, Attempts);
  
  post(URL, _Payload, OkCodes, _State, 0) ->
  
negative.code: %% Returns run mode, depending on application settings.
  %% @end
  %%--------------------------------------------------------------------
  -spec resolve_run_mode() -> run_mode().
  resolve_run_mode() ->
      ModeEnv = onepanel_env:get(letsencrypt_mode, ?APP_NAME, full),
      case {ModeEnv, ?STAGING_DIRECTORY_URL} of
          {production, _} -> production;
  