File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
clients/algoliasearch-client-php/lib/Support Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -151,13 +151,13 @@ public static function retryForApiKeyUntil(
151
151
152
152
// In case of an addition, if there was no error, the $key has been added as it should be
153
153
if ('add ' === $ operation ) {
154
- return ;
154
+ return $ response ;
155
155
}
156
156
157
157
// In case of an update, check if the key has been updated as it should be
158
158
if ('update ' === $ operation ) {
159
159
if (self ::isKeyUpdated ($ response , $ apiKey )) {
160
- return ;
160
+ return $ response ;
161
161
}
162
162
}
163
163
@@ -166,9 +166,9 @@ public static function retryForApiKeyUntil(
166
166
// In case of a deletion, if there was an error, the $key has been deleted as it should be
167
167
if (
168
168
'delete ' === $ operation
169
- && ' Key does not exist ' === $ e ->getMessage ()
169
+ && $ e ->getCode () === 404
170
170
) {
171
- return ;
171
+ return null ;
172
172
}
173
173
174
174
// Else try again ...
Original file line number Diff line number Diff line change @@ -389,14 +389,14 @@ use {{invokerPackage}}\Support\Helpers;
389
389
$maxRetries = $this -> config -> getDefaultMaxRetries ();
390
390
}
391
391
392
- Helpers::retryForApiKeyUntil(
392
+ return Helpers::retryForApiKeyUntil(
393
393
$operation,
394
394
$this,
395
395
$key,
396
396
$apiKey,
397
397
$maxRetries,
398
398
$timeout,
399
- null ,
399
+ 'Algolia\AlgoliaSearch\Support\Helpers::linearTimeout' ,
400
400
$requestOptions
401
401
);
402
402
}
You can’t perform that action at this time.
0 commit comments