Debugging
Handling errors, enabling logging and viewing logs.
It's recommended that you wrap displayNotification
and createTriggerNotification
in a try/catch to catch any validation errors that may be thrown:
try {
await notifee.displayNotification({
title: 'Chat with Joe Bloggs',
body: 'A new message has been received from a user.',
...
});
} catch (e) {
console.log(e);
}