Misleading error message on bad exec payload from flag
- Dominant language
- Go
- Stars
- 21
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Original Author: @slonokot
Running `shore exec` with bad JSON payload will produce misleading error message:
```shell
$ shore exec -p '{"application": "a", "pipeline": "b",,,}'
required args key 'pipeline' missing
required args key 'application' missing
$ shore exec -p '{"application": "a", "pipeline": "b}'
required args key 'pipeline' missing
required args key 'application' missing
$ shore exec -p '{"application": "a", "pipeline": "b", "parameters":}'
required args key 'pipeline' missing
required args key 'application' missing
```
The expected behaviour simillar to `shore render`'s one:
`"While parsing config: unexpected end of JSON input"`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the `shore exec -p` payload parsing path and compare it with `shore render`'s error handling. Reproduce the malformed JSON examples and make `shore exec` report the JSON parsing error instead of missing required keys; done when the examples produce the expected parsing message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100