Skip to content
Snippets Groups Projects
Commit 4166f91a authored by Joel Brockbank's avatar Joel Brockbank Committed by Liam Morland
Browse files

Issue #3499472: Handle 504 Timeout from GCNotify

parent 92b08b03
No related branches found
No related tags found
1 merge request!6Issue #3499472: Handle 504 Timeout from GCNotify
Pipeline #394829 passed with warnings
......@@ -37,6 +37,11 @@ class GcNotifyApiService {
*/
const REQUEST_EXCEPTION = 3;
/**
* The API request returned a timeout, 504 status.
*/
const REQUEST_TIMEOUT = 4;
/**
* Get config var limit_recipients_in_request limited to the allowed range.
*
......@@ -323,6 +328,10 @@ class GcNotifyApiService {
$return = static::REQUEST_EXCEPTION;
break;
case 504:
$return = static::REQUEST_TIMEOUT;
break;
default:
$return = static::REQUEST_ERROR;
}
......@@ -404,6 +413,7 @@ class GcNotifyApiService {
$status_codes = [
static::REQUEST_DAILY_LIMIT,
static::REQUEST_EXCEPTION,
static::REQUEST_TIMEOUT,
];
if (in_array($result, $status_codes, TRUE)) {
return static::queueHttpRequest($request_body);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment