-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP Requests seem to not return an error yet discordia returns nil #335
Comments
It can be still an HTTP error without it printing that into the console, for example, when the logger level is lower than needed. To make sure if it is erroring or it is some bug, Discordia will always return |
my logger level is debug |
Note: After a conversation on Discord regarding this, I've advised @TheFortex to manually update http-codec. I was suspecting that one of the recently fixed bugs in http-codec was causing some of the packets to be dropped client side. I am waiting until it is confirmed to fix this issue here, assuming it was indeed a bug. |
According to @TheFortex this seem to be solved by just using the newer http-codec. @SinisterRectus we might want to release the http-codec fix faster and start using it by Discordia 2. Not sure how wide this issue is, but it probably is affecting a lot of people. |
Having what looks to be the same issue here -- once in a blue moon, I have the bot send a message, and it shows up in Discord, but the send() call returns nil with the error "http-codec.lua:256: chunk-size field too large." Should I just update http-codec.lua, then? (ie, from here?) Edit: Was able to hunt down the replacement file in Discord. (In case anybody needs it: it wasn't there, it was here). Given that the code is only running about a dozen times a week, and the error only seems to happen once every few dozen runs, it'll probably be a while before I can say with confidence whether or not it helped. |
http-codec has been updated on Lit very recently, all you need to do is delete it from your By the way, you can easily know where a Lit module was sourced from if you refer to https://luvit.io/lit.html and search the module. |
This hasn't been an issue for the first month or so when my bot was hosted but then it just showed up out of nowhere and I've tried going around the issue by retrying to send the request if it returns nil but that came up with another issue where sometimes for example when sending a message the message would get sent in discord but not returned so the bot sends it again
take for example this request:
client:getChannel(data.jobChannels[channels[channel]]):getMessages(100)
It works fine most of the time but then randomly it will just return nil for no reason and the logs have no http errors at all. Is this an issue in discordia or from discord's side or just a network issue?
The text was updated successfully, but these errors were encountered: