File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -350,15 +350,16 @@ import WebPush
350350
351351do {
352352 try await manager .send (
353- json: [" title" : " Test Notification" , " body" : " Hello, World!"
353+ json: [" title" : " Test Notification" , " body" : " Hello, World!" ,
354+ to: subscriber
354355 // / If sent from a request, pass the request's logger here to maintain its metadata.
355356 // logger: request.logger
356357 )
357- } catch BadSubscriberError () {
358+ } catch is BadSubscriberError {
358359 // / The subscription is no longer valid and should be removed.
359- } catch MessageTooLargeError () {
360+ } catch is MessageTooLargeError {
360361 // / The message was too long and should be shortened.
361- } catch let error as HTTPError {
362+ } catch let error as PushServiceError {
362363 // / The push service ran into trouble. error.response may help here.
363364} catch {
364365 // / An unknown error occurred.
You can’t perform that action at this time.
0 commit comments