Skip to content

Commit

Permalink
validate error Media upload failed on all hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
clairton committed Nov 14, 2024
1 parent 8f678c9 commit e7d7b09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/services/client_baileys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,11 @@ export class ClientBaileys implements Client {
throw new Error(`Unknow message type ${type}`)
}
}
} catch (e) {
} catch (ee) {
let e = ee
if (ee.message == 'Media upload failed on all hosts') {
e = new SendError(11, ee.message)
}
if (e instanceof SendError) {
const code = e.code
const title = e.title
Expand Down

0 comments on commit e7d7b09

Please sign in to comment.