Repository navigation
Conversation
… to actionable messages
access-profiles requestable-entitlements add passed raw API 400 errors
("cannot add C1 app entitlements to a catalog", "Role membership
entitlements can only be added to Catalog profiles") with no guidance.
Map three known mismatch patterns to cleaner c1i-terminology messages that
name the access profile id and suggest 'access-profiles get <id>'. Unknown
400s pass through unchanged (exit 2 is preserved).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Maps 3 known entitlement-type/profile-type mismatch 400 responses from
access-profiles requestable-entitlements addto actionable, c1i-terminology error messages. Unknown/unmapped 400s still pass through unchanged.Why
requestable-entitlements addreturned raw, opaque API 400s when the entitlement type didn't match the profile type, with no pre-validation or guidance, and the API's own error text used API terminology ("Catalog profiles") instead of c1i's ("access-profiles"). 5 occurrences were observed in one day. Sample raw errors: "cannot add C1 app entitlements to a catalog", "Role membership entitlements can only be added to Catalog profiles", "membership entitlements of Catalog and Hybrid access profiles cannot be added to a Catalog profile; access profile is not a Role profile".Bead: global-w291.3
Verification
go build ./...,go vet ./...— cleango test ./...— all packages pass (10335 tests; 1 pre-existing unrelated failure intokensource, not touched by this change)golangci-lint run --timeout=3m ./...— 0 issuesorigin/main(3 release commits, docs-only; rebased cleanly, no conflicts) and re-ran the full check before pushingOpened from Charles's local c1i issue triage.