mirror of
https://github.com/Radarr/Radarr
synced 2025-12-06 08:28:50 +01:00
Log request failures in Notifiarr
This commit is contained in:
parent
49dac0ebaa
commit
bbeb4d7b5f
1 changed files with 3 additions and 0 deletions
|
|
@ -50,6 +50,7 @@ private void ProcessNotification(WebhookPayload payload, NotifiarrSettings setti
|
||||||
switch ((int)responseCode)
|
switch ((int)responseCode)
|
||||||
{
|
{
|
||||||
case 401:
|
case 401:
|
||||||
|
_logger.Error("HTTP 401 - API key is invalid");
|
||||||
throw new NotifiarrException("API key is invalid");
|
throw new NotifiarrException("API key is invalid");
|
||||||
case 400:
|
case 400:
|
||||||
// 400 responses shouldn't be treated as an actual error because it's a misconfiguration
|
// 400 responses shouldn't be treated as an actual error because it's a misconfiguration
|
||||||
|
|
@ -59,6 +60,7 @@ private void ProcessNotification(WebhookPayload payload, NotifiarrSettings setti
|
||||||
case 502:
|
case 502:
|
||||||
case 503:
|
case 503:
|
||||||
case 504:
|
case 504:
|
||||||
|
_logger.Error("Unable to send notification. Service Unavailable");
|
||||||
throw new NotifiarrException("Unable to send notification. Service Unavailable", ex);
|
throw new NotifiarrException("Unable to send notification. Service Unavailable", ex);
|
||||||
case 520:
|
case 520:
|
||||||
case 521:
|
case 521:
|
||||||
|
|
@ -67,6 +69,7 @@ private void ProcessNotification(WebhookPayload payload, NotifiarrSettings setti
|
||||||
case 524:
|
case 524:
|
||||||
throw new NotifiarrException("Cloudflare Related HTTP Error - Unable to send notification", ex);
|
throw new NotifiarrException("Cloudflare Related HTTP Error - Unable to send notification", ex);
|
||||||
default:
|
default:
|
||||||
|
_logger.Error(ex, "Unknown HTTP Error - Unable to send notification");
|
||||||
throw new NotifiarrException("Unknown HTTP Error - Unable to send notification", ex);
|
throw new NotifiarrException("Unknown HTTP Error - Unable to send notification", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue