Skip to content

Network request error creates non-serializable actionΒ #252

@ghost

Description

I'm using redux-toolkit which includes custom middleware that checks if Redux actions are serializable. When a RequestError occurs, it looks like redux-api-middleware creates a non-serializable Redux action, which it probably shouldn't:

A non-serializable value was detected in an action, in the path: `payload`. Value:, [RequestError: Network request failed], 
Take a look at the logic that dispatched this action: , Object {
  "error": true,
  "meta": undefined,
  "payload": [RequestError: Network request failed],
  "type": "auth/authFailure",
}, 
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)
- node_modules/expo/build/logs/LogSerialization.js:166:14 in _captureConsoleStackTrace
- node_modules/expo/build/logs/LogSerialization.js:41:24 in serializeLogDataAsync
- ... 9 more stack frames from framework internals

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions