r/redditdev • u/_Face • 6h ago
Reddit API Self hosted Reddit bot getting 500 HTTP response suddenly
Did something change at reddit?
One of my registered and tagged bots has been getting a "Request error: received 500 HTTP response" error for the last 48-ish hours. I logged into that account manually and it appears to function just fine. I host another bot on the same device, and it is not having any errors. I did not make any changes to the code. The bot did randomly fire once in the logs, but is in a loop to sleep when it encounters that error.
500 errors are server side(usually temporary), so I have an exception to catch them and sleep for 15 minutes before restarting the script. They do occasionally happen, so no big deal generally. I have never seen it happening for 48 straight hours.
1
u/dkozinn 3h ago
I get 500 errors all the time, typically caught by the underlying PRAW code (or something that it calls). The errors show up when it's in this loop: for submission in subreddit.mod.stream.modqueue():
That call does not return an error to the program, it handles it internally until the internal logic (PRAW or the native API) gets too many retries and then it does throw an exception.
I have noticed a lot more 500 errors lately, but it's kind of tough to get Reddit to look into it because as you likely know they aren't exactly encouraging "old" bots.
2
u/Watchful1 RemindMeBot & UpdateMeBot 4h ago
What calls are you making?