diff --git a/src/services/NotificationService.ts b/src/services/NotificationService.ts index 7e6ec1e..defd0f0 100644 --- a/src/services/NotificationService.ts +++ b/src/services/NotificationService.ts @@ -111,9 +111,11 @@ export class NotificationService { }); const json = await response.json(); - // Check whether it was successful - // Return the result - return false; + if (response.status !== 200) { + console.error(`Notification failed for device ${deviceId}:`, json.reason); + return false; + } + return true; } private getAPNsFullUrlToUse(deviceId: string) {