SP-648: Handle disabled asset registry feature flag in Content CLI#360
Open
Kastriot Salihu (ksalihu) wants to merge 1 commit into
Open
SP-648: Handle disabled asset registry feature flag in Content CLI#360Kastriot Salihu (ksalihu) wants to merge 1 commit into
Kastriot Salihu (ksalihu) wants to merge 1 commit into
Conversation
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]>
|
|
|
||
| ## Troubleshooting | ||
|
|
||
| If the asset registry is disabled on your team (feature flag `pacman.asset-registry` is off), commands fail with: |
Contributor
There was a problem hiding this comment.
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: |
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.



Summary
handleAssetRegistryApiErrorto detect Pacman'spacman.asset-registrydisabled response (403with{"error": "Asset registry feature is currently disabled"}) and show a clear user-facing message.asset-registryAPI methods (list,skills list,get,schema,examples,validate) through the shared helper.mockAxiosGetError/mockAxiosPostErrorand add unit/integration tests for disabled-flag vs generic error paths.Test plan
npm test -- --testPathPattern=asset-registry(46 tests)content-cli asset-registry listagainst a team withpacman.asset-registrydisabled → friendly message, exit 1https://celonis.atlassian.net/browse/SP-648
Made with Cursor