Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve error for invalid JSON in command argument #1152

Merged
merged 3 commits into from Oct 26, 2023

Conversation

eglitise
Copy link
Collaborator

Currently, when attempting to call the executeScript or updateSettings command, if an invalid JSON argument is given, the app will return 2 errors - one for the invalid JSON, and another for the actual method execution.

Changes included in this PR:

  • do not call the client method if JSON parsing fails
  • add translation key for the JSON error, which also adds the failed JSON string inside the error

@eglitise eglitise added the fix This resolves a user-facing problem label Oct 25, 2023
@eglitise eglitise merged commit 70376c0 into appium:main Oct 26, 2023
5 checks passed
@eglitise eglitise deleted the fix-commands-json-handling branch October 26, 2023 09:40
shiva-guntoju pushed a commit to shiva-guntoju/appium-inspector that referenced this pull request Feb 2, 2024
* fix: improve error for wrong JSON command argument

* chore: address review comments

* fix: show parsing error message in notification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix This resolves a user-facing problem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants