Skip to content

Commit a8309ba

Browse files
update comment
1 parent 759ba53 commit a8309ba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/store/utils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
/** Serialize the error to make it Redux-compatible */
1+
/**
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+
*/
26
export function serializeError(error: unknown) {
37
if (error instanceof Error) {
48
return {message: error.message, name: error.name};

0 commit comments

Comments
 (0)