Azure / Azure/azure-rest-api-specs

Security Center Workspace Setting Returns an Error Message Even When Successful

Open
#21,287 8 comments 0 reactions 0 assignees View on GitHub
customer-reported Mgmt needs-team-attention question Security Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

Package Name: azure.mgmt.security
Package Version: 2017_08_01_preview
Operating System: Linux (ubuntu 20.04)
Python Version: 3.9.14

Describe the bug: When deleting a workspace setting, the operation is successful and returns 200 OK but still returns an error message:

File "***/azure/mgmt/security/v2017_08_01_preview/operations/_workspace_settings_operations.py", in delete
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'OK'

To Reproduce:
1. Make sure there is a default workspace setting with az cli command: az security workspace-setting list
2. Create an instance of security center in Python code: sec_instance = SecurityCenter(subscription_id=SUBSCRIPTION_ID, credential=new_credential)
3. Delete the security_center_setting in Python code: sec_instance.workspace_settings.delete(workspace_setting_name="default")

Expected behavior: Deletion should occur (preferably with a return message but the docs show no default return message anyway) and no error response if successful

Contributor guide

Open the contributing guide

Research direction

Start with the reported delete entry point in azure/mgmt/security/v2017_08_01_preview/operations/_workspace_settings_operations.py and trace how the successful 200 OK response is handled. Reproduce the deletion described with the default workspace setting, then verify that a successful deletion completes without raising HttpResponseError.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
api, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.