Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic on bad JSON for --json-body argument #450

Open
davepacheco opened this issue Dec 1, 2023 · 0 comments
Open

panic on bad JSON for --json-body argument #450

davepacheco opened this issue Dec 1, 2023 · 0 comments

Comments

@davepacheco
Copy link

Following #449, I switched to /dev/stdin and found that the command still panics when it fails to parse JSON:

dap@ivanova ~ $ echo '{"source": { "url": "http://catacomb.eng.oxide.computer/media/cloud/debian-11-genericcloud-amd64.raw", block_size: 512 } }' | oxide image create --name my-image --description my-description --os debian --version 11 --json-body /dev/stdin
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Error("key must be a string", line: 1, column: 104)', cli/src/generated_cli.rs:5801:84
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: JoinError::Panic(Id(17), ...)', cli/src/main.rs:59:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant