Repository navigation
fix(webdriver): handle non-W3C HTTP error responses in MobileErrorHandler - #1366
hoanle0126 wants to merge 3 commits into
Conversation
0da2609 to
8933e90
Compare
|
I guess this PR has been changed since the original one. I added #1367 to simplify this appium client's behavior. Have you seen any necessary situation with this fix for w3c supported Appium versions? |
|
@KazuCocoa Yes, this PR was rebased onto #1367 (
Re-verified |
|
Could you clarify whether you've actually encountered these issues in a real environment using a W3C-compliant Appium version? I understand that these issues could theoretically occur, but I'd like to know whether they've been observed in practice. |
|
@KazuCocoa To be transparent, I have not encountered either case against a live W3C-compliant Appium server in practice. I noticed them while reading In practice, only non-W3C HTTP If you'd prefer keeping |
|
Thanks for the clarification. I think it makes sense to narrow the scope of this PR to handling non-W3C HTTP error responses (e.g., 401/502/503 from proxies or gateways), since those can realistically occur even when using a W3C-compliant Appium server. Could you remove the handling for flat JSON error objects and non-standard alert I'd also prefer to keep the HTTP error handling minimal: raise a generic Please keep the tests focused on these HTTP error cases as well. |
|
@KazuCocoa Updated in 67b0579: removed the flat JSON error and non-dict alert |
Change list
Raise a generic
WebDriverExceptioninMobileErrorHandler.check_responsewhen an HTTP error response (status >= 400, such as 401/502/503 proxy or gateway responses) cannot be handled as a standard W3C error, while continuing to delegate standard W3C errors to Selenium and ignoring legacy JSONWP status payloads.Added unit tests in
test/unit/webdriver/errorhandler_test.pycovering non-W3C HTTP error responses and proxy/gateway failures.Types of changes