Skip to content

Commit

Permalink
Add error logging if device push registration fails (#1062)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielNovak authored Apr 12, 2024
1 parent 30b6a6d commit a35123b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ internal class StreamNotificationManager private constructor(
deviceTokenStorage.updateUserDevice(pushDevice.toDevice())
Result.Success(newDevice)
} catch (e: Exception) {
logger.e(e) {
"Failed to register device for push notifications " +
"(PN will not work!). Does the push provider key " +
"(${pushDevice.pushProvider.key}) match the key in the Stream Dashboard?"
}
Result.Failure(Error.ThrowableError("Device couldn't be created", e))
}
}
Expand Down

0 comments on commit a35123b

Please sign in to comment.