agraboso / agraboso/redux-api-middleware
Network request error creates non-serializable action
- Langage dominant
- JavaScript
- Étoiles
- 1.5k
- Forks
- 190
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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
```
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.