Fix non existing deployment error message#2083
Merged
thewulf7 merged 1 commit intomicrosoft:masterfrom Sep 13, 2022
Merged
Conversation
Contributor
|
Hello and thank you for the pull request, we need some time to review and test it. |
AnatolyPristensky
approved these changes
Sep 13, 2022
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
thewulf7
approved these changes
Sep 13, 2022
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.
Hi,
When running the
appcenter codepush deployment history Deployment --app Org/Appcommand when Org/App exists but does not have a deployment called "Deployment" I get the following error output:{"succeeded":false,"errorCode":6,"errorMessage":"The app Org/App does not exist. Please double check the name, and provide it in the form owner/appname. \nRun the command \u001b[1mappcenter apps list\u001b[22m to see what apps you have access to."}This error message is misleading since it tells the user that the app does not exist, and in this case it's the deployment that does not exist.
I ran the command with the
--debugflag to understand what result was returned from the backend, and I got this output:Using appcenter-cli version: 2.11.0 logFilter, request: { "rawResponse": false, "queryString": {}, "url": "https://api.appcenter.ms/v0.1/apps/Org/App/deployments/Deployment/releases", "method": "GET", "headers": { "Content-Type": "application/json; charset=utf-8", "user-agent": "appcenterCli/2.11.0 NodeJS/v18.6.0 darwin/21.6.0", "x-api-token": "xxx", "internal-request-source": "cli", "diagnostic-context": "xxx", "cli-command-name": "codepush deployment history" }, "body": null } Response status code: 404 Body: Deployment "Deployment" does not exist.It looks like this API now returns a
404code instead of a400previously.I opened this PR in the case this API change is made to last, but I think it might actually make more sense to change the API response to return a
400as before so this issue is fixed for all users.