Skip to content

Raise ArgumentError on non-Hash/non-String patch_signals input#27

Open
andriytyurnikov wants to merge 1 commit intostarfederation:mainfrom
rubakas:feature/patch-signals-validate-input
Open

Raise ArgumentError on non-Hash/non-String patch_signals input#27
andriytyurnikov wants to merge 1 commit intostarfederation:mainfrom
rubakas:feature/patch-signals-validate-input

Conversation

@andriytyurnikov
Copy link
Copy Markdown

Replaces closed #25 (couldn't reopen via API). Same change — see prior PR thread for full discussion.

The case/when in patch_signals had no else branch, so passing
nil, an Array, an Integer, or any other non-Hash/non-String value
silently produced an SSE event with only a header and no data:
line — a malformed patch-signals event the browser would receive
as effectively empty.

The Dispatcher docstring already declares the contract:
@param signals [Hash, String]. This makes the runtime match.

Test coverage for nil, Array, Integer, Symbol.
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.

1 participant