Windows desktop applications
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ToastNotification.Failed | failed event

Occurs when an error is caused when Windows attempts to raise a toast notification. Apps that are running subscribe to this event.


function onFailed(eventArgs) { /* Your code */ }
// addEventListener syntax
toastNotification.addEventListener("failed", onFailed);
toastNotification.removeEventListener("failed", onFailed);
- or -

toastNotification.onfailed = onFailed;

Event information

Delegate TypedEventHandler<ToastNotification, ToastFailedEventArgs>


The reason for the toast's failure can be found in the ErrorCode property of the ToastFailedEventArgs parameter.

The most common failure that you'll see when you raise a toast is a settings error, for instance a block on toast notifications for this user. We recommend that you call ToastNotifier.Setting before you call Show instead of handling that situation through this event.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0


Windows::UI::Notifications [C++]



Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]


Windows::UI::Notifications [C++]



See also

Toast notifications sample
Sending toast notifications from desktop apps sample
Toast XML schema
Toast notification overview
Quickstart: Sending a toast notification
Quickstart: Sending a toast push notification
Quickstart: Sending a toast notification from the desktop
Guidelines and checklist for toast notifications
How to handle activation from a toast notification
How to opt in for toast notifications
How to schedule a toast notification
How to enable desktop toast notifications through an AppUserModelID
The toast template catalog
Toast audio options



© 2016 Microsoft