erictik / midjourney-api

MidJourney client. Unofficial Node.js client
Apache License 2.0
1.65k stars 271 forks source link

can not catch the error RemixApi failed with status 429 #197

Closed hejuntt1014 closed 11 months ago

hejuntt1014 commented 12 months ago

the code that reproduces this issue or a replay of the bug

Unhandled Rejection at: Promise {

Error: RemixApi failed with status 429 at onmodal (/midjourney-api/src/midjourney.ts:307:23) at processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.onmodal (/midjourney-api/src/discord.ws.ts:548:23) ### Describe the bug **Describe the bug** can not catch RemixApi failed with status 429. **Expected behavior** Hope to catch this exception through try-catch. like try{ const Variation = await client.Variation({ .... }catch(err){ } **Screenshots** Unhandled Rejection at: Promise { Error: RemixApi failed with status 429 at onmodal (/midjourney-api/src/midjourney.ts:307:23) at processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.onmodal (/midjourney-api/src/discord.ws.ts:548:23) ### error log Unhandled Rejection at: Promise { Error: RemixApi failed with status 429 at onmodal (/midjourney-api/src/midjourney.ts:307:23) at processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.onmodal (/midjourney-api/src/discord.ws.ts:548:23)
zcpua commented 12 months ago

Bug Report for Examples,please

zcpua commented 12 months ago

example: https://github.com/erictik/midjourney-api/blob/main/example/variation-ws.ts