Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] Add client side validation for
volume_type
(#4289)
## Changes This PR adds validation that the value provided for `volume_type` is one of the correct values. The server today provides an incorrect error message: ``` 10:30:10 DEBUG POST /api/2.1/unity-catalog/volumes > { > "catalog_name": "main", > "name": "cli-volume", > "schema_name": "schema-dec-dabs", > "volume_type": "managed" > } < HTTP/2.0 400 Bad Request < { < "details": [ < { < "@type": "type.googleapis.com/google.rpc.ErrorInfo", < "domain": "unity-catalog.databricks.com", < "metadata": { < "field_name": "volume_type" < }, < "reason": "INVALID_FIELD" < }, < { < "@type": "type.googleapis.com/google.rpc.RequestInfo", < "request_id": "2ca7e630-ce06-4c85-ad95-9b3b52987009", < "serving_data": "" < } < ], < "error_code": "INVALID_PARAMETER_VALUE", < "message": "CreateVolume Missing required field: volume_type" < } ``` ## Tests Unit tests
- Loading branch information