redux-devtools-dispatch icon indicating copy to clipboard operation
redux-devtools-dispatch copied to clipboard

Request for better error messages/check action's structure

Open tendermario opened this issue 6 years ago • 0 comments

Hello! I was puzzled for a while because I formatted my action poorly like so:

{
type: "ADD_GROUP_TO_PROJECT",
payload: {
  projectId: "24763583",
  id: "2476358367294e4"
}

I didn't have the closing curly brace.

However the error message returned was "Unexpected token )" which confused me for an embarassingly long time before I managed to figure this out.

I just thought it would be a good idea to add something make sure the structure is valid, as I believe this error message is from accepting the action 'as is' and then bumping into some other code where it errors out.

Thanks!

tendermario avatar Oct 03 '18 21:10 tendermario