Skip to main content

Troubleshooting

Business Tools

SymptomLikely causeFix
AI cites knowledge base onlyNo workspaceId on widgetSet data-workspace-id / workspaceId
Tool never offeredenabled: false or wrong workspaceEnable tool; verify integration workspace
customer_not_foundEmail not in SDK directoryFix lookup mapping; test directory
invalid_signature (SDK)Secret mismatchAlign Admin secret + QEFRO_SIGNING_SECRET
REST 401Wrong API key/bearerTest Tool; rotate secret
END_USER_IDENTITY requires...No identify()Call identify before account tools
OTP loopWrong resume handlingVerify authorize on ctx.response
Portal can't run toolEND_USER_IDENTITY on PortalTest on Widget
Sync lists 0 toolsWebhook down / wrong pathTest Connection; check /qefro
SSRF blockedPrivate URLUse public HTTPS
Playground works, widget doesn'tMissing identify or workspaceMatch playground workspace + widget config

Debug workflow

curl -sS -H "Authorization: Bearer $ADMIN_JWT" \
https://api.qefro.com/api/v1/tools/$TOOL_ID/logs

Canonical runtime reference: Business Tool Runtime.

SDK connections

SymptomFix
Webhook unreachableVerify HTTPS, firewall, and /qefro path
Signature mismatchConfirm secret parity; check v1:{timestamp}:{body} format
Tool discovery emptyRegister handlers before listen(); run Sync Tools with workspace_id

Use framework app.listen() — it handles ping, tools.list, tool.invoke, and tool.resume.

Widget identity

  • Widget token ≠ admin JWT
  • Global constructor: AIWidget.Widget
  • REST END_USER_IDENTITY needs widget.identify() with JWT or session

Demo: rest-order-api widget-identity-demo.