mirror of
https://github.com/RevenueCat/purchases-ios
synced 2026-11-10 22:45:55 +05:45
* refactor: model ForceServerErrorStrategy interception as a single Action enum The two closures (`fakeResponseWithoutPerformingRequest` and `shouldForceServerError`) encoded an implicit precedence rule that only lived in a doc comment. A single closure returning `Action` makes each request resolve to exactly one outcome. Co-authored-by: Cursor <cursoragent@cursor.com> * refactor: log the destination URL and faked status code when forcing errors Both messages previously identified only the request, so a faked 404 and a faked 204 looked identical, and there was no way to tell whether a forced error routed to the 502 endpoint or to an unreachable host. Co-authored-by: Cursor <cursoragent@cursor.com> * feat(remote-config): force the config kill-switch via force_killswitch query param The Maestro E2E app faked a local 404 for /v1/config, which never exercised the backend's real kill-switch response. RevenueCat/khepri#23311 adds an opt-in `force_killswitch=true` query param that serves the actual 400 CONFIG_ENDPOINT_DISABLED for that request only. `serverErrorURL` cannot be reused here because it replaces the whole URLRequest, dropping the method, auth headers and body the endpoint needs. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>