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 7a70f63 commit c196689Copy full SHA for c196689
examples/basic-crud-application/server/lib/util.ts
@@ -7,8 +7,8 @@ export enum Errors {
7
8
const errorValues: string[] = Object.values(Errors);
9
10
-export function sanitizeErrorMessage(message: string) {
11
- if (errorValues.includes(message)) {
+export function sanitizeErrorMessage(message: any) {
+ if (typeof message === "string" && errorValues.includes(message)) {
12
return message;
13
} else {
14
return "an unknown error has occurred";
0 commit comments