File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
clients/algoliasearch-client-php/lib/Support Expand file tree Collapse file tree 2 files changed +5
-5
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 @@ -396,7 +396,7 @@ use {{invokerPackage}}\Support\Helpers;
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