oxidecomputer / oxidecomputer/omicron
IP range JSON validation error is not helpful
Open
@david-crespo is already working on this.
Since Mar 20, 2024.
api
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
I tried various kinds of bad IP range and they all have the same horrible message, even when the addresses themselves are valid but first > last or one is IPv4 and the other is IPv6.
> (await oxide.ipPoolRangeRemove({ path: { pool: 'default' }, body: { first: '', last: '' } })).data.message
"unable to parse JSON body: data did not match any variant of untagged enum IpRange"
> (await oxide.ipPoolRangeRemove({ path: { pool: 'default' }, body: { first: 'abc', last: 'def' } })).data.message
"unable to parse JSON body: data did not match any variant of untagged enum IpRange"
> (await oxide.ipPoolRangeRemove({ path: { pool: 'default' }, body: { first: '1.1.1.2', last: '1.1.1.1' } })).data.message
"unable to parse JSON body: data did not match any variant of untagged enum IpRange"
> (await oxide.ipPoolRangeRemove({ path: { pool: 'default' }, body: { first: '1.1.1.2', last: '2001:db8:3333:4444:CCCC:DDDD:EEEE:FFFF' } })).data.message
"unable to parse JSON body: data did not match any variant of untagged enum IpRange"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.