Skip to content

Commit

Permalink
refactor: optimize error util function
Browse files Browse the repository at this point in the history
  • Loading branch information
skgndi12 committed Dec 19, 2023
1 parent 0e5f28c commit 592e0f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/src/util/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function isErrorWithMessage(error: unknown): error is ErrorWithMessage {
typeof error === 'object' &&
error !== null &&
'message' in error &&
typeof (error as Record<string, unknown>).message === 'string'
typeof error.message === 'string'
);
}

Expand Down

0 comments on commit 592e0f2

Please sign in to comment.