When executing a deploy using the --app flag, the following error is encountered even though the app is verified to exist on the server:
{"statusCode":400,"error":"Bad Request","message":"App not found. Verify the app's name: mytestapp"}
The issue arises when mytestapp is not locally on disk but does exist by the exact name on the server. The error message infers that the app was not found on the SERVER and gives no indication that the problem is actually in the payload submitted as it did not contain the mytestapp.json. There is simply no way for a user to know, from the error message, that the file is missing and the message itself leads the user to believe it's a server-side issue.
While the steps to reproduce below are somewhat contrived to easily reproduce the problem, an example scenario where this could occur in practice is a user retrieve --since XXX which results in the mytestapp.json not being retrieved because it didn't meet the since criteria and then tries to deploy --app mytestapp.
Steps to Reproduce
- Create NLX site
- Create an app
mytestapp
- Retrieve the entire site
- Delete apps/mytestapp.json from local disk
- Deploy using
--app mytestapp flag
Expected Result
Either the app should deploy the resources on disk associated to the app (if its possible without the app.json file itself being present) or worst case should give the user a meaningful message that the app exists on the server but was not present in the submitted "upload/payload" and to check their local file system to ensure the app file is present.
Additionally, when --app is specified and the app.json included in the submitted payload, if any entities/resources that are assigned to the app (e.g., pages, datasources, etc.) are not present in the payload, the app & any entities that are included should be updated on the server but any entities/resources that were not present in the payload should have a warning emitted that indicates they were not updated to avoid the user thinking they updated the entire app when only a portion of it was actually updated.
Actual Result
The following error is emitted which is:
- Not user friendly in terms of the format of the message itself
- Misleading as it leads the user to believe the app does not exist on the server
- Lacking full explanation of what the actual problem is
- A raw http response dump which could be difficult to discern for someone not familiar with HTTP protocol - the error message can be extracted and all the additional response information discarded and logged separately as a debug message.
`{"statusCode":400,"error":"Bad Request","message":"App not found. Verify the app's name: mytestapp"}`
When executing a deploy using the
--appflag, the following error is encountered even though the app is verified to exist on the server:{"statusCode":400,"error":"Bad Request","message":"App not found. Verify the app's name: mytestapp"}The issue arises when
mytestappis not locally on disk but does exist by the exact name on the server. The error message infers that the app was not found on the SERVER and gives no indication that the problem is actually in the payload submitted as it did not contain themytestapp.json. There is simply no way for a user to know, from the error message, that the file is missing and the message itself leads the user to believe it's a server-side issue.While the steps to reproduce below are somewhat contrived to easily reproduce the problem, an example scenario where this could occur in practice is a user
retrieve --since XXXwhich results in themytestapp.jsonnot being retrieved because it didn't meet thesincecriteria and then tries todeploy --app mytestapp.Steps to Reproduce
mytestapp--app mytestappflagExpected Result
Either the app should deploy the resources on disk associated to the app (if its possible without the
app.jsonfile itself being present) or worst case should give the user a meaningful message that the app exists on the server but was not present in the submitted "upload/payload" and to check their local file system to ensure the app file is present.Additionally, when
--appis specified and theapp.jsonincluded in the submitted payload, if any entities/resources that are assigned to the app (e.g., pages, datasources, etc.) are not present in the payload, the app & any entities that are included should be updated on the server but any entities/resources that were not present in the payload should have a warning emitted that indicates they were not updated to avoid the user thinking they updated the entire app when only a portion of it was actually updated.Actual Result
The following error is emitted which is: