decentraland / decentraland/creator-hub
Disable serialization for custom errors on renderer middleware
Open
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 14
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 44
Description
When a redux thunk rejects with a custom error, redux prints a warning on the console because it's not able to serialize-deserialize it. For example:
```js
return rejectWithValue(new ProjectError('INVALID_PATH'));
```
Warning/Error:
The warning doesn't have any side effects, as the errors can be handled anyway, but disabling this warning with `{ serializableCheck: true }` is not a good solution.
A possible solution is to modify the middleware to hande custom errors (errors that extend from BaseError) without trying to serialize them, but keep serialization on all the other values.
Contributor guide
Assessment
This issue has not been assessed yet.