Skip to content

fix(context): surface driver errors instead of empty context list - #485

Merged
KazuCocoa merged 2 commits into
appium:mainfrom
Mochxd:fix/context-surface-driver-errors
Aug 12, 2026
Merged

fix(context): surface driver errors instead of empty context list#485
KazuCocoa merged 2 commits into
appium:mainfrom
Mochxd:fix/context-surface-driver-errors

Conversation

@Mochxd

@Mochxd Mochxd commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Problem

appium_context swallowed failures from getCurrentContext / getContexts with .catch(() => null) / .catch(() => []), so a real driver/session error was reported as "No contexts available."

Fix

Let those calls reject into the existing try/catch so the tool returns the actual error.

Test

Extended context.test.ts to assert a driver failure surfaces the error message and does not report an empty context list.

@KazuCocoa KazuCocoa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg, this looks better than the original implementation by #258

@KazuCocoa
KazuCocoa merged commit 0edcea8 into appium:main Aug 12, 2026
5 checks passed
@KazuCocoa KazuCocoa added the size:XS Contribution size XS label Aug 12, 2026
github-actions Bot pushed a commit that referenced this pull request Aug 12, 2026
## [1.92.1](v1.92.0...v1.92.1) (2026-08-12)

### Bug Fixes

* **context:** surface driver errors instead of empty context list ([#485](#485)) ([0edcea8](0edcea8))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.92.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released size:XS Contribution size XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants