mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Add unknown error is delivered total is 0 but there were no delivery errors
This commit is contained in:
parent
a688929488
commit
2ce85ce6ef
2 changed files with 6 additions and 2 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8c8f0b7ccb0d98e9561f03a6486de1e59f3b3b9d
|
Subproject commit 8a267dc220417dc1778ec5b391f9feacb8e1fdc5
|
||||||
|
|
@ -264,7 +264,7 @@ class Messaging extends Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
$deliveryErrors[] = 'Failed sending to targets ' . $batchIndex + 1 . '-' . \count($batch) . ' with error: ' . $e->getMessage();
|
$deliveryErrors[] = 'Failed sending to targets ' . $batchIndex + 1 . ' of ' . \count($batch) . ' with error: ' . $e->getMessage();
|
||||||
} finally {
|
} finally {
|
||||||
$batchIndex++;
|
$batchIndex++;
|
||||||
|
|
||||||
|
|
@ -288,6 +288,10 @@ class Messaging extends Action
|
||||||
$deliveryErrors = \array_merge($deliveryErrors, $result['deliveryErrors']);
|
$deliveryErrors = \array_merge($deliveryErrors, $result['deliveryErrors']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($deliveryErrors) && $deliveredTotal === 0) {
|
||||||
|
$deliveryErrors[] = 'Unknown error';
|
||||||
|
}
|
||||||
|
|
||||||
$message->setAttribute('deliveryErrors', $deliveryErrors);
|
$message->setAttribute('deliveryErrors', $deliveryErrors);
|
||||||
|
|
||||||
if (\count($message->getAttribute('deliveryErrors')) > 0) {
|
if (\count($message->getAttribute('deliveryErrors')) > 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue