Skip to content

Commit

Permalink
fix(proxy): better error handling when pull node never connected (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
garnier-quentin authored Jul 21, 2021
1 parent 8bc88db commit f503800
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gorgone/gorgone/modules/core/proxy/hooks.pm
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,17 @@ sub pathway {
}
}

if (!defined($first_target)) {
$options{logger}->writeLogDebug("[proxy] no pathway for target '$target'");
gorgone::standard::library::add_history(
dbh => $options{dbh},
code => GORGONE_ACTION_FINISH_KO, token => $options{token},
data => { message => 'proxy - no pathway for target ' . $target },
json_encode => 1
);
return -1;
}

# if there are here, we use the first pathway (because all pathways had an issue)
return (1, 0, $first_target . '~~' . $target, $first_target, $target);
}
Expand Down

0 comments on commit f503800

Please sign in to comment.