Skip to content

SP-648: Handle disabled asset registry feature flag in Content CLI#360

Open
Kastriot Salihu (ksalihu) wants to merge 1 commit into
mainfrom
ksalihu/SP-648-asset-registry-flag-disabled
Open

SP-648: Handle disabled asset registry feature flag in Content CLI#360
Kastriot Salihu (ksalihu) wants to merge 1 commit into
mainfrom
ksalihu/SP-648-asset-registry-flag-disabled

Conversation

@ksalihu
Copy link
Copy Markdown
Contributor

Summary

  • Add handleAssetRegistryApiError to detect Pacman's pacman.asset-registry disabled response (403 with {"error": "Asset registry feature is currently disabled"}) and show a clear user-facing message.
  • Wire all six asset-registry API methods (list, skills list, get, schema, examples, validate) through the shared helper.
  • Extend HTTP test mocks with mockAxiosGetError / mockAxiosPostError and add unit/integration tests for disabled-flag vs generic error paths.
  • Document the troubleshooting message in the asset-registry user guide.

Test plan

  • npm test -- --testPathPattern=asset-registry (46 tests)
  • Manual: run content-cli asset-registry list against a team with pacman.asset-registry disabled → friendly message, exit 1
  • Manual: run same command with flag enabled → unchanged behavior

https://celonis.atlassian.net/browse/SP-648

Made with Cursor

When Pacman returns 403 with the pacman.asset-registry disabled body,
asset-registry commands now surface a clear team-level message instead
of raw JSON. Adds shared error parsing, HTTP mock helpers for 4xx, and
tests for all asset-registry API methods.

Includes-AI-Code: true
Co-authored-by: Cursor <[email protected]>
@ksalihu Kastriot Salihu (ksalihu) requested review from a team as code owners May 26, 2026 13:12
@sonarqubecloud
Copy link
Copy Markdown


## Troubleshooting

If the asset registry is disabled on your team (feature flag `pacman.asset-registry` is off), commands fail with:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think it's useful information for the user to know the feature flag string.

Suggested change
If the asset registry is disabled on your team (feature flag `pacman.asset-registry` is off), commands fail with:
If the asset registry is disabled on your team, commands fail with:

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.

2 participants