getsentry / getsentry/sentry

Incorrect Validation Message for Threshold Values

Open
#83,939 2 comments 0 reactions 0 assignees View on GitHub
Product Area: Alerts
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
22h 21m
Merged PRs (30d)
586

Description

### Environment

SaaS (https://sentry.io/)

### Steps to Reproduce

When setting both the warning and resolved thresholds to the same decimal value (e.g., 0.1), an incorrect error message is displayed: Unable to save alert: warning alert threshold must be above resolution threshold. This issue does not occur with whole numbers like 1.

1. Navigate to the "Set thresholds" section of the alert rule editor.
2. Select Static: above or below {x}.
3. Set the warning threshold to 0.1.
4. Set the resolved threshold to 0.1.
5. Attempt to save the alert rule.

### Expected Result

Either:

1. Both thresholds should be allowed to have the same decimal value.
2. If disallowed, the error message should specify that warning and resolution thresholds cannot be equal when using decimal values, or that decimal values are not supported.

### Actual Result

An incorrect error message is shown:
Unable to save alert: warning alert threshold must be above resolution threshold.

Image

Image

### Product Area

Alerts

### Link

_No response_

### DSN

_No response_

### Version

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.