Source Events ↗

request.not_found

Request returned 404.

When
After the fallback handler responds with not found.
Payload
JSON: { request_id, client_ip, method, path, query }.
Cancelable
No

Useful with probe protection to understand noisy paths.

Use cases

  • Security analytics
  • Missing route debugging

Example

Registration and handler

Register

hook!(host, PluginEvent::RequestNotFound, on_request_not_found);

Handler

extern "C" fn on_event(ctx: *const EventContext) -> HookResult {
    let ctx = unsafe { &*ctx };
    let payload = unsafe { std::slice::from_raw_parts(ctx.payload_ptr, ctx.payload_len) };
    let _json = std::str::from_utf8(payload).unwrap_or_default();
    HookResult::r#continue()
}

← All lifecycle events