Skip to content

[ISSUE] Impossible to update an External Location name #293

Open
@fvitolo

Description

@fvitolo

Description
Trying to update the name of an external location results in the following error:

Exception in thread "main" com.databricks.sdk.core.error.platform.BadRequest: Response from server (Bad Request) {"error_code":"INVALID_PARAMETER_VALUE","message":"UpdateExternalLocation Both new_name and name cannot be specified.","details":[{"@type":"type.googleapis.com/google.rpc.ErrorInfo","reason":"INVALID_FIELD","domain":"unity-catalog.databricks.com","metadata":{"field_name":"name"}},{"@type":"type.googleapis.com/google.rpc.RequestInfo","request_id":"fabd8702-15e4-4dbb-a924-d968e9ae2246","serving_data":""}]}: Cannot construct instance of `com.databricks.sdk.core.error.ErrorDetail`, problem: Cannot invoke "Object.getClass()" because "m" is null
 at [Source: (String)"{"error_code":"INVALID_PARAMETER_VALUE","message":"UpdateExternalLocation Both new_name and name cannot be specified.","details":[{"@type":"type.googleapis.com/google.rpc.ErrorInfo","reason":"INVALID_FIELD","domain":"unity-catalog.databricks.com","metadata":{"field_name":"name"}},{"@type":"type.googleapis.com/google.rpc.RequestInfo","request_id":"fabd8702-15e4-4dbb-a924-d968e9ae2246","serving_data":""}]}"; line: 1, column: 405] (through reference chain: com.databricks.sdk.core.error.ApiErrorBody["details"]->java.util.ArrayList[1])

Reproduction

UpdateExternalLocation updateExternalLocation = new UpdateExternalLocation();
updateExternalLocation.setName(oldName);
updateExternalLocation.setNewName(newName);
return workspaceClient.externalLocations().update(updateExternalLocation);

Expected behavior
It should be possible to update the name of the external location.

Is it a regression?
No

Debug Logs

Exception in thread "main" com.databricks.sdk.core.error.platform.BadRequest: Response from server (Bad Request) {"error_code":"INVALID_PARAMETER_VALUE","message":"UpdateExternalLocation Both new_name and name cannot be specified.","details":[{"@type":"type.googleapis.com/google.rpc.ErrorInfo","reason":"INVALID_FIELD","domain":"unity-catalog.databricks.com","metadata":{"field_name":"name"}},{"@type":"type.googleapis.com/google.rpc.RequestInfo","request_id":"fabd8702-15e4-4dbb-a924-d968e9ae2246","serving_data":""}]}: Cannot construct instance of `com.databricks.sdk.core.error.ErrorDetail`, problem: Cannot invoke "Object.getClass()" because "m" is null
 at [Source: (String)"{"error_code":"INVALID_PARAMETER_VALUE","message":"UpdateExternalLocation Both new_name and name cannot be specified.","details":[{"@type":"type.googleapis.com/google.rpc.ErrorInfo","reason":"INVALID_FIELD","domain":"unity-catalog.databricks.com","metadata":{"field_name":"name"}},{"@type":"type.googleapis.com/google.rpc.RequestInfo","request_id":"fabd8702-15e4-4dbb-a924-d968e9ae2246","serving_data":""}]}"; line: 1, column: 405] (through reference chain: com.databricks.sdk.core.error.ApiErrorBody["details"]->java.util.ArrayList[1])

Other Information

  • Sdk Version: 0.25.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions