diff options
| author | winter | 2025-04-03 22:06:47 +0100 |
|---|---|---|
| committer | winter | 2025-04-03 22:06:47 +0100 |
| commit | 44212e6248c93171ddedb51bfdb212ce8ffed695 (patch) | |
| tree | 26d87e7ddbc887d5c727d1b45f09807226e71976 /Digitigrade/Job | |
| parent | dc1deda3a02e3ebc31d4ed3a256580469cf83c0e (diff) | |
indicate error on failed push (status != 20x)
Diffstat (limited to 'Digitigrade/Job')
| -rw-r--r-- | Digitigrade/Job/PushObject.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Digitigrade/Job/PushObject.php b/Digitigrade/Job/PushObject.php index 0278eb5..1f3bcd9 100644 --- a/Digitigrade/Job/PushObject.php +++ b/Digitigrade/Job/PushObject.php @@ -29,8 +29,9 @@ class PushObject extends Job { $log = Logger::getInstance(); $log->info("pushing object $object->uri to server $instance->domain"); + $successful = false; try { - $instance->pushObject($object); + $successful = $instance->pushObject($object); } catch (EndpointMissingException $e) { $log->warning("can't push to $instance->domain because it has no push endpoint. giving up"); // and don't throw again here because we want it to look successful and not be retried @@ -43,5 +44,8 @@ class PushObject extends Job { $log->warning("can't push to $instance->domain because a policy rejected it. giving up"); // and don't throw again, pretty much same reasoning as above } + if (!$successful) { + throw new \RuntimeException("failed to push to $instance->domain"); + } } }
\ No newline at end of file |
