Cryptic error message - uncaught error condition
- Vorherrschende Sprache
- JavaScript
- Sterne
- 95
- Forks
- 45
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### Expected Behaviour
When error condition exists, the cli politely informs the user what was wrong with their command
### Actual Behaviour
developer needs a degree in crypto-zoology to figure out where the error is coming from
### Reproduce Scenario (including but not limited to)
I have no idea how the user arrived at this state, but it IS possible that our template tooling produced an app config that was not valid. Most likely this was the result of an attempt to change an existing app from the old structure to the new structure.
#### Steps to Reproduce
1. add the sample code listed below
2. run any command that reads app config ex. `aio app info`
#### Environment Info
```
System:
OS: macOS 11.6
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 21.37 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.18.0 - ~/.nvm/versions/node/v14.18.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.15 - ~/.nvm/versions/node/v14.18.0/bin/npm
Virtualization:
Docker: 20.10.8 - /usr/local/bin/docker
npmGlobalPackages:
@adobe/aio-cli: 8.2.0
```
#### Sample Code that illustrates the problem
##### app.config.yaml
```yml
hooks:
test: "jest --passWithNoTests ./test",
e2e: "jest --collectCoverage=false --testRegex ./e2e"
```
#### Logs taken while reproducing problem
```bash
✗ aio app info
› Error: bad indentation of a mapping entry at line 45, column 52:
› ... "jest --passWithNoTests ./test",
›
```
Beitragsleitfaden
Rechercherichtung
Beginne damit, den Fehler mit der bereitgestellten app.config.yaml und dem Befehl `aio app info` nachzustellen. Verfolge, wo der YAML-Parsingfehler ausgegeben wird, und sorge dann dafür, dass die CLI die ungültige Konfiguration und ihren Ort klar identifiziert; fertig ist es, wenn dieses Szenario statt des kryptischen nicht abgefangenen Fehlers eine hilfreiche Meldung erzeugt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- cli
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100