Skip to content

notify

notify(title, body, [timeout_ms]) sends a desktop notification immediately. Thin wrapper around SpyWeb’s native notification sender, usable from any hook including error paths.

notify(title, body, [timeout_ms])
async
Param Type Description
title string Notification title
body string Notification body text
timeout_ms number? Optional timeout in milliseconds (default: 5000)

None.

function after_fetch(fetch_result, ctx)
if not fetch_result.ok then
notify("Network error", fetch_result.error.message, 10000)
return nil
end
return fetch_result
end
  • log - Append to hooks.log file