mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: better WS error map
This commit is contained in:
@@ -339,6 +339,8 @@ export const getCodeFromWSError = (error: Error) => {
|
||||
if(!Number.isNaN(code) && code >= 400) {
|
||||
statusCode = code
|
||||
}
|
||||
} else if((error as any).code?.startsWith('E')) { // handle ETIMEOUT, ENOTFOUND etc
|
||||
statusCode = 408
|
||||
}
|
||||
|
||||
return statusCode
|
||||
|
||||
Reference in New Issue
Block a user