Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different Exception Handlung GCM <> Apns? #191

Open
tbsmark86 opened this issue Apr 24, 2020 · 0 comments
Open

Different Exception Handlung GCM <> Apns? #191

tbsmark86 opened this issue Apr 24, 2020 · 0 comments

Comments

@tbsmark86
Copy link

tbsmark86 commented Apr 24, 2020

Hi,
due to live-server problems i've noted that GCM errors get a "PushException" while Apns Error just throw something deep down the zend framework.
I propose to handle it the same as in gcm.php:

--- a/vendor_patches/sly/notification-pusher/src/Sly/NotificationPusher/Adapter/Apns.php
+++ b/vendor_patches/sly/notification-pusher/src/Sly/NotificationPusher/Adapter/Apns.php
@@ -23,6 +23,7 @@ use ZendService\Apple\Apns\Client\Message as ServiceClient;
 use ZendService\Apple\Apns\Message as ServiceMessage;
 use ZendService\Apple\Apns\Message\Alert as ServiceAlert;
 use ZendService\Apple\Apns\Response\Message as ServiceResponse;
+use ZendService\Apple\Exception\RuntimeException as ServiceRuntimeException;
·
 /**
  * APNS adapter.
@@ -96,7 +97,7 @@ class Apns extends BaseAdapter implements FeedbackAdapterInterface
·
                 $this->response->addOriginalResponse($device, $response);
                 $this->response->addParsedResponse($device, $responseArr);
-            } catch (\RuntimeException $e) {
+            } catch (ServiceRuntimeException $e) {
                 throw new PushException($e->getMessage());
             }
         }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants