-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
It would be useful to be able to check if an errors comes from pusher by checking against the pusher error classes.
Proposed:
import Pusher, { PusherRequestError, PusherWebHookError } from 'pusher'
const pusher = new Pusher(/*...*/)
try {
// more code
pusher.trigger(/*...*/)
// more code
} catch(error) {
if (error instanceof PusherRequestError || error instanceof PusherWebHookError) {
// handle pusher error
}
throw error
}Metadata
Metadata
Assignees
Labels
No labels