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
Subscriberobject level then it would override the error handler provided atSubscriptionServicelevel.
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 Examples#
You 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