structured error codes should be in propolis-client
#775
Labels
api
Related to the API.
enhancement
New feature or request.
server
Related specifically to the Propolis server API and its VM management functions.
Currently,
propolis-server
's API returns structured error codes for certain error conditions:propolis/crates/propolis-api-types/src/lib.rs
Lines 443 to 485 in f255595
These are parsed by
sled-agent
and used to detect particular error conditions, such as thepropolis-server
believing that an instance-ensure request has never been received. At present, the enum representing these error codes is defined in thepropolis-api-types
crate, which requires that sled-agent depend on it. Thepropolis-api-types
dependency is not otherwise needed by sled-agent. It would be much nicer if sled-agent could get the definition of the error code values from itspropolis-client
dependency, instead. Ideally, these would be part of the OpenAPI document and generated by Progenitor when building the client, as discussed in oxidecomputer/omicron#6726 (comment)Ideally, we would be able to define the error codes returned by these APIs as part of the Dropshot server and have them be included in the OpenAPI spec without requiring us to patch the document to include them. See oxidecomputer/dropshot#39 and oxidecomputer/dropshot#41 for related issues.
The text was updated successfully, but these errors were encountered: