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

Catch errors receiving individual input messages #3843

Merged
merged 7 commits into from Jun 30, 2023

Conversation

gadenbuie
Copy link
Member

@gadenbuie gadenbuie commented Jun 21, 2023

Fixes #3840 by catching errors when calling inputBinding.receiveMessage() on individual messages in the inputMessages handler.

It turns out that wrapping the message handler call itself in _sendMessagesToHandlers(), as proposed here, wasn't quite low enough: the messages are processed at once by each handler so if one input message failed, all subsequent input messages in the same cycle would fail as well.

While here, I also updated the error message in the SliderInputBinding when a zero-length value is received.

TODO

  • Add R-side validation of value in updateSliderInput()?

@CLAassistant
Copy link

CLAassistant commented Jun 21, 2023

CLA assistant check
All committers have signed the CLA.

@gadenbuie gadenbuie marked this pull request as ready for review June 23, 2023 14:40
@gadenbuie gadenbuie requested review from wch and cpsievert June 23, 2023 14:40
@gadenbuie gadenbuie merged commit 31aca7a into main Jun 30, 2023
12 checks passed
@gadenbuie gadenbuie deleted the fix/3840-update-slider-length-zero-array branch June 30, 2023 21:10
schloerke added a commit that referenced this pull request Jul 7, 2023
* main: (55 commits)
  Catch errors receiving individual input messages (#3843)
  Clarify what's ignored by ignoreNULL (#3827)
  Remove tests/testthat/apps/ (#3841)
  Correctly set width on `textarea` input element (#3838)
  Update selectize.js documentation URLs (#3836)
  test(json digits): Try unsetting option in test to get default behavior (#3837)
  Rebuild docs
  Update README.md
  fix typo in the docs for bindCache (#3825)
  Allow for `shiny:::toJSON()` to respect if `digits` has class `AsIs` to represent `use_signif=` (#3819)
  More complete `downloadButton()` example
  Rename actionQueue to taskQueue, add more context to the NEWS item (#3801)
  Remove unneeded packages from package.json
  Rebuild docs
  Rebuild shiny.js
  Update @types/node
  Rebuild yarn.lock
  Fix brush resetting behavior. Closes #3785
  Bump fastmap dependency to 1.1.1
  Sync package version (GitHub Actions)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

updateSliderInput with an empty vector as value can block all other update*Input calls
3 participants