Skip to content

[CXH-2017] - Fix user_type description to match Retool API enum#38

Merged
sergiocorral-conductorone merged 2 commits into
mainfrom
sergiocorral/cxh-2017-baton-retool-account-creation-form-suggests-user_type
Jul 14, 2026
Merged

[CXH-2017] - Fix user_type description to match Retool API enum#38
sergiocorral-conductorone merged 2 commits into
mainfrom
sergiocorral/cxh-2017-baton-retool-account-creation-form-suggests-user_type

Conversation

@sergiocorral-conductorone

Copy link
Copy Markdown
Contributor

Summary

  • Fixes the user_type field description in the account-creation provisioning schema
  • The old description listed "endUser" as a valid value, but the Retool API rejects it with HTTP 400
  • Updated to reflect the actual accepted values: default, mobile, embed

Fixes CXH-2017

🤖 Generated with Claude Code

The description incorrectly listed "endUser" as a valid user_type value.
Retool's API rejects "endUser" with HTTP 400; the accepted values are
"default", "mobile", and "embed".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sergiocorral-conductorone
sergiocorral-conductorone requested a review from a team July 10, 2026 17:13
@linear-code

linear-code Bot commented Jul 10, 2026

Copy link
Copy Markdown

CXH-2017

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown

Connector PR Review: [CXH-2017] - Fix user_type description to match Retool API enum

Blocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0
Criteria: Criteria status: loaded .claude/skills/ci-review.md from trusted base 0a4c8c6fc8e0.
Review mode: full
View review run

Review Summary
Scanned the full PR diff for security and correctness. This change corrects the user_type provisioning-schema description (removing the invalid "endUser" value), aligns the README note, and adds an allowlist (validUserTypes) that validates user_type in CreateAccount before the API call. The validation is consistent with the docs — the empty string is permitted and defers to the Retool default via the omitempty request field. No new security or correctness issues found.

Security Issues
None found.

Correctness Issues
None found.

Suggestions

  • pkg/connector/users.go:138 — The new validUserTypes validation is untested; there is no _test.go in pkg/connector. Consider a small table-driven test covering valid values, empty, and an invalid value to lock in this behavior.
Prompt for AI agents
Verify each finding against the current code and only fix it if needed.

Suggestions:

In pkg/connector/users.go:
- Around line 137-140: The new user_type allowlist validation in CreateAccount has no
  test coverage (there is currently no _test.go in pkg/connector). Add a table-driven
  test that exercises CreateAccount user_type validation for default/mobile/embed
  (accepted), empty string (accepted, defers to API default), and an invalid value such
  as endUser (rejected with codes.InvalidArgument). This locks in the enum contract
  described in the connector.go schema and README.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found.

Comment thread pkg/connector/connector.go
Return InvalidArgument early if user_type isn't "", "default", "mobile",
or "embed" instead of letting the Retool API reject it with a 400, and
document the allowed values in the README.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found.

@btipling btipling removed their assignment Jul 14, 2026
@sergiocorral-conductorone
sergiocorral-conductorone merged commit 778d209 into main Jul 14, 2026
5 checks passed
@sergiocorral-conductorone
sergiocorral-conductorone deleted the sergiocorral/cxh-2017-baton-retool-account-creation-form-suggests-user_type branch July 14, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants