ErrorsBuilt-in services · rule
bot_check.settings_invalid
An application's bot_check:, or a route's, is invalid, or a route asks for a check with no connection to make it.
Area 16, Built-in services; not declinable; the next step is usually the agent's.
Why Jadpo refuses it
A route with bot_check: true has the challenge widget's token checked
before it runs, through the package application { bot_check: } names,
such as Cloudflare Turnstile's. With no connection named, or one that
can't check a token, every request would get through unchecked while
the route looks protected, so Jadpo stops at the setting instead.
What it looks like
The demo-request route asks for a check, and app.jadpo names no
connection to make it through.
domains/sales/routes/demo_requests.jadpo:
use sales/types { DemoForm, DemoReceived }use sales/actions { request_demo }/// Demo requests, which scripts can't send.routes DemoRequests { prefix: /demo-requests POST / { authentication: RouteAuthentication.none input: DemoForm output: DemoReceived status: SuccessStatus.created run: request_demo(input) bot_check: true }}
error bot_check: true has no connection to check through
--> domains/sales/routes/demo_requests.jadpo:14:20
|14 | bot_check: true | ^^^^ no `bot_check:` in `app.jadpo`
- reason
- A route's token is checked by the package
application { bot_check: { connection: } }names, such as Cloudflare Turnstile's; with none named, every request would get through unchecked. - next
- Add
bot_check: { connection: <name> }toapplication { }inapp.jadpo, naming a connection to a package that providesbot_check(agent) - rule
- bot_check.settings_invalid
- help
- https://jadpo.
dev/docs/errors/bot_ check. settings_ invalid
(agent) at the end of the next: line means your coding agent can make
the fix itself.
How to fix it
If the route should be checked, connect the package that checks a
token and name it in bot_check:. In app.jadpo:
application { connections: { shield: { package: AcmeShield.v1 credential: config.shield_key host: config.shield_host site_key: config.shield_site } } bot_check: { connection: shield }}
The browser now shows the provider's widget and sends its token in the
X-Bot-Check header, and a request without one, or with one the
provider doesn't pass, is refused with bot_check_failed before the
action runs. A route that needs no check leaves bot_check: out: every
public route already has a rate limit, which slows a script but doesn't
stop one.
Related
Markdown for agents: /docs/errors/bot_check.settings_invalid.md.Built from Jadpo's main branch at commit f05ed31.