Skip to content

📜 Outpost Verdicts ​

Outpost handlers must return a verdict that determines how navigation proceeds.

📋 Return Values ​

ReturnResultNavigation
verdicts.ALLOWContinueProceeds
verdicts.BLOCKCancelStops immediately
{ name: 'route' }Redirect (named)Redirects
{ path: '/path' }Redirect (path)Redirects
'/path'Redirect (string)Redirects
throw ErrorErrorHandled by onError

📊 Outpost Verdict Decision Flow ​

WARNING

Redirect routes are validated against the router. If the route is not found, an error is thrown.

TIP

The handler receives a context object with verdicts, to, from, router, and hook. See Handler Context for the full interface and usage examples.

TIP

When a handler throws an error, the citadel catches it and handles gracefully. See Error Handling for the full error flow, onError, onTimeout, and afterEach behavior.

Diagram Legend
ColorMeaning
🟢Success, ALLOW, continue
🟡Warning, redirect, deduplicate
🔴Error, BLOCK, cancel
🔵Logging (when logger is enabled)
🟣Named debug breakpoint (debug: true)

Released under the MIT License.