Skip to content

Name the connector setting that left a JSON body template invalid - #1998

Merged
helpcodeai merged 1 commit into
mainfrom
fix/body-template-missing-setting
Dec 6, 2026
Merged

helpcodeai merged 1 commit into
mainfrom
fix/body-template-missing-setting

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

When a connector setting used in a bare JSON slot of a bodyTemplate is missing or empty, the call fails with bodyTemplate produced invalid JSON after interpolation (...) and nothing else. The user can't tell which field to fill in. On Cloud, an Odoo JSON-RPC setup check failed eight times in a row this way ("args":["{{ODOO_DB}}",{{ODOO_UID}},...] with no user id set).

The error now names the setting, for example: The connector setting `ODOO_UID` has no value: fill it in on the connector page. Only names are shown, never values.

Changes

  • interpolateConnectorConfig: in a JSON bodyTemplate, a variable set to an empty string in a bare (unquoted) slot keeps its {{NAME}} placeholder instead of rendering ,,. That body was invalid JSON before and still is, so nothing new reaches the target system. Quoted slots and XML bodies are unchanged.
  • RestEngine: when the body does not parse, the hint also lists {{NAME}} placeholders left in the template (missing or empty settings), next to the existing ${param} hint.

Type

  • Bug fix
  • New feature
  • Documentation
  • Refactoring
  • Performance improvement
  • Other (describe below)

Testing

  • Added/updated unit tests
  • Tested manually (describe steps below)
  • No tests needed (explain why)

In packages/backend (after npx prisma generate):

  • npx jest --maxWorkers=4 src/common/env-interpolation.util.spec.ts src/connectors/engines/rest.engine.spec.ts src/adapters: 1001 suites passed, 1 skipped; 37,945 tests passed, 2,348 skipped (live specs).
  • npx tsc --noEmit -p tsconfig.json: no errors.
  • npx eslint on the changed files: no findings.

Both deployment modes behave the same: this is the shared REST engine.

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • I have updated documentation (if applicable)
  • All existing tests pass (npm test)
  • This PR has a descriptive title

Related Issues

Found in the 2026-12-06 Cloud tool-error review.

@helpcodeai
helpcodeai merged commit ff4a005 into main Dec 6, 2026
17 checks passed
@helpcodeai
helpcodeai deleted the fix/body-template-missing-setting branch December 6, 2026 09:14
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant