mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
docs: fix basic crud example
Related: https://github.com/socketio/socket.io/issues/4213
This commit is contained in:
@@ -7,8 +7,8 @@ export enum Errors {
|
||||
|
||||
const errorValues: string[] = Object.values(Errors);
|
||||
|
||||
export function sanitizeErrorMessage(message: string) {
|
||||
if (errorValues.includes(message)) {
|
||||
export function sanitizeErrorMessage(message: any) {
|
||||
if (typeof message === "string" && errorValues.includes(message)) {
|
||||
return message;
|
||||
} else {
|
||||
return "an unknown error has occurred";
|
||||
|
||||
Reference in New Issue
Block a user