Closed demeringo closed 1 year ago
We have implemented an HTTP 404 error when the instance is not given with the following answer :
{
"detail": "a1.4 not found"
}
Would this be ok for your use case ? If so it will be available in the v0.2
Implemented in https://github.com/Boavizta/boaviztapi/issues/83
Bug description
If I query API for cloud impacts for an instance-type that has no data in the API dataset, the API returns Error 500.
To Reproduce
Query the API (https://api.boavizta.org/docs#/cloud/instance_cloud_impact_v1_cloud_aws_post) with one of theses instance types :
Expected behavior
Not sure what we should return, this issue is more to open the discussion:
{}
)Additional context
Not a critical bug IMHO, but raises the question of which error / status codes we would like to have globally for API behavior.
When writting a client, we still have the ability to avoid this error by pre-checking if the givent instance type is supported (see https://api.boavizta.org/docs#/cloud/server_get_all_archetype_name_v1_cloud_aws_all_instances_get)