Closed mjfwebb closed 3 weeks ago
The recent changes in customRewards.ts
under server/src/handlers/twitch/helix
involve the addition of error handling for forbidden statuses. The code now imports StatusCodes
from 'http-status-codes' and checks if the result status is FORBIDDEN
, logging an error message if this condition is met. This enhances the robustness of the error handling mechanism.
File Path | Change Summary |
---|---|
server/src/handlers/twitch/helix/customRewards.ts |
Added import for StatusCodes from 'http-status-codes'. Added a check for result.status being FORBIDDEN and logs an error message if true. |
In the code where rewards do flow,
A check for status now we show.
If forbidden paths we tread,
An error logs, no more dread.
WithStatusCodes
we stand tall,
Robust and strong, we catch the fall.
🐰✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
If you are not an affiliate or partner then the API responds with a forbidden status code which currently crashes the bot.
Summary by CodeRabbit