We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 759ba53 commit a8309baCopy full SHA for a8309ba
src/store/utils.ts
@@ -1,4 +1,8 @@
1
-/** Serialize the error to make it Redux-compatible */
+/**
2
+ * Serialize the error to make it Redux-compatible
3
+ *
4
+ * It prevents redux console error on string error in code - `throw new Error("description")`
5
+ */
6
export function serializeError(error: unknown) {
7
if (error instanceof Error) {
8
return {message: error.message, name: error.name};
0 commit comments