Conversation
05b7caa to
dde8ece
Compare
datadog/api/base.py
Outdated
There was a problem hiding this comment.
Could you provide further details about the use case for this please ?
There was a problem hiding this comment.
Sure! Some 403 responses include custom error messages. For example, if a user tries to $ dog monitor unmute_all when the mute_all setting isn't enabled, the 403 response includes the error message: 'Monitoring is not currently globally muted'. Simply raising HttpError, however, just gives the user a generic '403 Client forbidden error'.
|
Thanks alot @wang-arthur. It looks great 👍 Before merging it, I think we should clarify which behaviors fall under the |
datadog/api/base.py
Outdated
There was a problem hiding this comment.
403 should probably be caught in this block and raise at this point https://github.com/DataDog/datadogpy/blob/clarify_mute_all/datadog/api/base.py#L160
Raising an AppError instead of an HTTPError for 403 responses also exposes the informational error message in the response.
Command does not add or clear mute settings for individual monitors. Rather, `mute_all` and `unmute_all` enable/disable a global setting (also known as downtime).
This argument allows users to clear all muted scopes of a monitor, instead of unmuting individual scopes one-by-one.
- Add test for unmuting all scopes - Update outdated mute tests
dde8ece to
a124a35
Compare
|
Thanks @yannmh! I made the revisions we discussed and cleaned up the commit history. |
|
Thanks a lot @wang-arthur. Merging it for the v0.7.0 release 🚢 |
Clarify monitor muting endpoints
all_scopes) to allow clearing all mute settings for a given monitor