decentraland / decentraland/creator-hub

Disable serialization for custom errors on renderer middleware

Open
#796 0 comments 0 reactions 0 assignees View on GitHub
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:

Image

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.