{"action":"closed","issue":{"url":"https://api.github.com/repos/acdlite/redux-actions/issues/164","repository_url":"https://api.github.com/repos/acdlite/redux-actions","labels_url":"https://api.github.com/repos/acdlite/redux-actions/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/acdlite/redux-actions/issues/164/comments","events_url":"https://api.github.com/repos/acdlite/redux-actions/issues/164/events","html_url":"https://github.com/acdlite/redux-actions/issues/164","id":190439143,"number":164,"title":"Non-FSA actions cause handleAction reudcers to emit confusing error messages","user":{"login":"noahsilas","id":193012,"avatar_url":"https://avatars.githubusercontent.com/u/193012?v=3","gravatar_id":"","url":"https://api.github.com/users/noahsilas","html_url":"https://github.com/noahsilas","followers_url":"https://api.github.com/users/noahsilas/followers","following_url":"https://api.github.com/users/noahsilas/following{/other_user}","gists_url":"https://api.github.com/users/noahsilas/gists{/gist_id}","starred_url":"https://api.github.com/users/noahsilas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noahsilas/subscriptions","organizations_url":"https://api.github.com/users/noahsilas/orgs","repos_url":"https://api.github.com/users/noahsilas/repos","events_url":"https://api.github.com/users/noahsilas/events{/privacy}","received_events_url":"https://api.github.com/users/noahsilas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-18T22:40:06Z","updated_at":"2016-11-21T20:01:51Z","closed_at":"2016-11-21T20:01:51Z","body":"In #141 an invariant checks that each action is an FSA before attempting to process it. When attempting to upgrade to 1.0.0, this causes issues in a large app I am working on where our more recent actions follow the FSA pattern, but older actions do not. When those older actions were triggered, the invariant caught them and prevented the reducers that are actually intended to process that type of action from receiving it.\r\n\r\nThis is at odds with allowing larger apps to migrate incrementally; we need to update _all_ of our actions / reducers to upgrade.\r\n\r\nFurther, the error message generated by #141 was actually misleading; the actions had a `type` attribute, which is a stronger redux convention than FSA, but had attributes that aren't on the FSA whitelist (https://github.com/acdlite/flux-standard-action/blob/master/src/index.js).\r\n\r\nIt seems like there are a couple decisions to be made:\r\n\r\n1. Should using this package require that all of your actions be FSA?\r\n2. Should using this package require that all of your actions have a `type`?\r\n\r\nIf the answer to (1) is \"yes\", then we can close this issue (although we should probably document this in the README).\r\n\r\nIf the answer to (1) is \"no\", then I can use an answer to (2) to write a PR. Let me know what y'all think.\r\n\r\nIMO, reducers created by handleAction should only complain if an action is emitted with a type that they are listening for that is not an FSA. That opinion seems to be at odds with this request, which makes it sound like someone encountered an incident where they were emitting an action without a `type` that was hard to diagnose. In that scenario, it seems like the action wasn't created via `createAction`, and so I sort of expect that onus to fall on the developer (although I could certainly be convinced that there are better options available)."}}
{"actor":{"display_login":"timche"}}