exasol / databricks-virtual-schema

Virtual Schema for connecting Databricks as a data source to Exasol
MIT License
0 stars 0 forks source link

Improve error message when catalog or schema does not exist #9

Open kaklakariada opened 3 weeks ago

kaklakariada commented 3 weeks ago

Creating a VS using non-existing catalog or schema currently fails with a technical, non-user-friendly error message:

E-VSDAB-5: HTTP request for URL 'https://abc123.cloud.databricks.com/api/2.1/unity-catalog/tables?catalog_name=no-such-catalog&schema_name=no-such-schema&max_results=50&include_delta_metadata=false&omit_columns=false&omit_properties=true&include_browse=false' failed with status 404 ('HTTP/1.1 404 Not Found') and body '{"error_code":"CATALOG_DOES_NOT_EXIST","message":"Catalog 'no-such-catalog' does not exist.","details":[{"@type":"type.googleapis.com/google.rpc.ErrorInfo","reason":"RESOURCE_DOES_NOT_EXIST","domain":"unity-catalog.databricks.com","metadata":{"resourceType":"Catalog","resourceIdentifier":"no-such-catalog"}},{"@type":"type.googleapis.com/google.rpc.RequestInfo","request_id":"abc123","serving_data":""}]}

Instead the error message should state that the given catalog or schema does not exist.