Skip to content

on_error

on_error(err, ctx) runs when a scrape cycle fails. Defined in defer.lua.

function on_error(err, ctx) -> void
Field Type Description
err string Error message describing the failure
ctx table The cycle context table

None.

function on_error(err, ctx)
notify("Scrape failed", err, 5000)
log("Error: " .. err)
end