Version: v2
Internal Error Handling
To handle any internal error that might occur on pubsub side, the method handleError
can be declared either in Subscriber Object or in SubscriptionService.
- If the error handler is provided at
Subscriber
object level then it would override the error handler provided atSubscriptionService
level.
#
Subscriber handleError Examples#
Typescript subscription example/pubsub/subscriptions/simple.topic.name.console-log.sub.ts
#
Javascript subscription example/pubsub/subscriptions/simple.topic.name.sub.js
#
SubscriptionService handleError ExamplesYou can also setup a global error handler that will act as the default for all subscriptions, this though also receives the subscription metadat for which the error happens.
#
Typescript subscription example/pubsub/subscription.service.ts
#
Javascript subscription example/pubsub/subscription.service.js