Budibase/budibase · error
No recaptcha config found
Error message
No recaptcha config found
What it means
After a token is present, `verify` loads the reCAPTCHA configuration via `configs.getRecaptchaConfig()`. If no reCAPTCHA config exists (never set up, or not enabled for the tenant/app), the endpoint throws because verification cannot proceed without the site secret. The config must be created in config management before this endpoint can be used.
Source
Thrown at packages/server/src/api/controllers/recaptcha.ts:26
import { utils, Cookie, configs, UnexpectedError } from "@budibase/backend-core"
import {
setRecaptchaVerified,
isRecaptchaVerified,
} from "../../utilities/redis"
import fetch from "node-fetch"
export async function verify(
ctx: Ctx<VerifyRecaptchaRequest, VerifyRecaptchaResponse>
) {
const { token } = ctx.request.body
if (!token) {
throw new Error("Recaptcha token not found")
}
const config = await configs.getRecaptchaConfig()
if (!config) {
throw new Error("No recaptcha config found")
}
try {
const response = await fetch(
"https://www.google.com/recaptcha/api/siteverify",
{
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body: new URLSearchParams({
secret: config.config.secretKey,
response: token,
}),
}
)
const { success } = await response.json()View on GitHub (pinned to a81a902e9a)
Solutions
- Create/enable the reCAPTCHA config with a valid site key and secret via the config endpoints/UI
- Confirm the request runs in the tenant/workspace where the config exists
- Check the config is not disabled or expired
- Compare environment variables (e.g. MULTI_TENANCY settings) to ensure the config lookup targets the right scope
Example fix
// before
// call verify with no config set up -> 500
// after (setup step first)
await api.post("/api/global/configs", { type: "recaptcha", config: { siteKey, secretKey } })
await verifyRecaptcha({ token }) Defensive patterns
Strategy: validation
Validate before calling
const cfg = await api.get("/api/global/configs").then(r => r.find(c => c.type === "recaptcha"))
if (!cfg) throw new Error("Configure reCAPTCHA before calling verify") Type guard
const hasRecaptchaConfig = (configs) => Array.isArray(configs) && configs.some(c => c.type === "recaptcha" && c.config && c.config.secretKey)
Try / catch
try {
await verifyRecaptcha({ token })
} catch (e) {
if (String(e.message).includes("No recaptcha config found")) {
// guide admin to settings -> reCAPTCHA config
}
} Prevention
- Provision the reCAPTCHA config as part of environment setup
- Check config existence at app startup and surface a setup prompt
- Keep configs in sync across dev/staging/prod
- Verify multi-tenancy context headers are sent with config-dependent requests
When it happens
Trigger: Calling the verify endpoint in an environment where the reCAPTCHA config was never created, the config is disabled, the tenant scoping means the config isn't visible to the current app, or the config was recently deleted.
Common situations: Deploying to a new environment without migrating config settings; config stored per-tenant and the request lacks the right tenant/workspace context; feature flag or plan tier that excludes the reCAPTCHA config; testing locally where settings were never populated.
Understand the failure class
Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.
Related errors
- No google configuration found
- Google config not found
- No secret key provided
- Workspace DB not found - self-host users using cloud don't h
- CouchDB username not set
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/749c8c13f5798976.
Report an issue: GitHub.