mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-31 01:42:00 +08:00
chore: error checking condition !=200 is moved to >=400
This commit is contained in:
parent
574088ad54
commit
a34dbc4942
@ -15,7 +15,7 @@ function ListAlertRules(): JSX.Element {
|
|||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (status === 'error' || (status === 'success' && data.statusCode !== 200)) {
|
if (status === 'error' || (status === 'success' && data.statusCode >= 400)) {
|
||||||
notification.error({
|
notification.error({
|
||||||
message: data?.error || t('something_went_wrong'),
|
message: data?.error || t('something_went_wrong'),
|
||||||
});
|
});
|
||||||
@ -28,7 +28,7 @@ function ListAlertRules(): JSX.Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// api is successful but error is present
|
// api is successful but error is present
|
||||||
if (status === 'success' && data.statusCode !== 200) {
|
if (status === 'success' && data.statusCode >= 400) {
|
||||||
return (
|
return (
|
||||||
<ListAlert
|
<ListAlert
|
||||||
{...{
|
{...{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user