Skip to content

Commit

Permalink
Give a default response code if not initialized
Browse files Browse the repository at this point in the history
progress.opensuse.org/issues/104836
  • Loading branch information
FruitFly638 committed Jan 17, 2022
1 parent 4516dcb commit c6fc70c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/OpenQA/CLI/api.pm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ sub command {
$retries //= $ENV{OPENQA_CLI_RETRIES} // 0;
do {
$tx = $client->start($tx);
my $res_code = $tx->res->code;
my $res_code = $tx->res->code // 0;
return $self->handle_result($tx, {pretty => $pretty, quiet => $quiet, verbose => $verbose})
unless $res_code =~ /50[23]/ && $retries > 0;
print "Request failed, hit error $res_code, retrying up to $retries more times after waiting ...\n";
Expand Down

0 comments on commit c6fc70c

Please sign in to comment.