databricks-cli icon indicating copy to clipboard operation
databricks-cli copied to clipboard

groups/create throws INTERNAL_ERROR instead of RESOURCE_ALREADY_EXISTS

Open stanvv opened this issue 3 years ago • 0 comments

Previously the /api/2.0/groups/create threw a RESOURCE_ALREADY_EXISTS if the group was already present (as per docs). However, we now get

$databricks --profile DEV groups create --group-name 'testgroup1'
{
  "group_name": "testgroup1"
}

$databricks --profile DEV groups create --group-name 'testgroup1'
Error: b'{"error_code":"INTERNAL_ERROR","message":"There was an internal error handling request POST to /api/2.0/groups/create. Please try again later."}'

This makes error handling difficult, because we'd like to distinguish if there actually is an internal error. Was this documented somewhere and will this be reverted in the future? If not, how do we know this is related to an already existing group (and not an actual internal error)?

stanvv avatar Feb 08 '23 15:02 stanvv