-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
bug in SDKSomething isn't working in SDKSomething isn't working in SDK
Description
version(s) affected
1.10.0
Description
If a 302 error is returned when calling any REST method, and it is not related to a domain change, the request gets stuck in a loop and does not exit.
How to reproduce
We've encountered this error several times when accessing the self-hosted portal with an expired license. These portals redirect any request to "/bitrix/coupon_activation.php" page.
In .../bitrix24/b24phpsdk/src/Core/Core.php -> method call():
- We call $apiCallResponse = $this->apiClient->getResponse($apiMethod, $parameters);
- $apiCallResponse->getStatusCode() returns StatusCodeInterface::STATUS_FOUND
- It tries to replace portal's old domain with the new one (which is identical), and then do $response = $this->call($apiMethod, $parameters); which is the same query.
Manual handling with custom listener on app level is impossible as well as only event happens AFTER recursive method.
Possible Solution
Having this case handled at the package level is ideal. Or at least having additional event before the call is advised
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug in SDKSomething isn't working in SDKSomething isn't working in SDK