Errors
402 - addon required
What happened
The requested capability is not enabled for this instance. The response identifies the capability and may include an enablement link.
- Identify the capabilityRead which add-on the request requires.
- Review its availabilityCheck the configuration and billing requirements.
- Enable only when authorizedHave an authorized operator make the change.
- Verify after activationRetry the feature once its configuration is ready.
Request that triggers it
Calling a paid endpoint (here, natural-language SQL via /ask) before the ask addon is enabled.
curl -X POST "https://$OC_HOST/v1/tenants/$OC_TENANT/ask" \
-H "Authorization: Bearer $OC_TOKEN" \
-H "Content-Type: application/json" \
-d '{"question": "how many customers do I have?"}'Read the response
{
"error": "addon_required",
"message": "natural-language SQL requires the 'ask' addon",
"retry": false,
"addon": "ask",
"name": "Natural language SQL",
"monthly_usd": 99,
"purchase_url": "https://originchaindb.com/app/addons?enable=ask"
}Fix the request
- Read the capability named in the error.
- Check its availability for the instance.
- Review current billing terms before enabling it.
- Retry only after the configuration has changed.
Keep in mind: An error response is not consent to a purchase. Do not hardcode a price from this illustrative response into the application.
Common causes
- New tenant exploring paid endpoints during onboarding.
- Different tenant in the same org has the addon - tokens are per-instance, not org-wide.
- Free-configuration customer hitting a paid surface from a tutorial.
Continue
See error handling and retries, or return to error examples.