(msg: {
op: 'error';
'original-event': ResyncMsg;
status: number;
type: string;
})
| 902 | } |
| 903 | |
| 904 | public onResyncError(msg: { |
| 905 | op: 'error'; |
| 906 | 'original-event': ResyncMsg; |
| 907 | status: number; |
| 908 | type: string; |
| 909 | }) { |
| 910 | // Clear the subscription and start from scrath on any resync error |
| 911 | // This can happen if the auth changed and we need to refetch with the |
| 912 | // new auth or if the subscription is too far behind. |
| 913 | const subscriptionId = msg['original-event']['subscription-id']; |
| 914 | const removedSub = this.clearSubscriptionData(subscriptionId, false); |
| 915 | if (removedSub) { |
| 916 | this.initSubscription(removedSub.query, removedSub.hash); |
| 917 | } |
| 918 | } |
| 919 | } |
no test coverage detected