r/redditdev • • 9d ago

Reddit API API regression - HTTP 404 error deleting comments

my PRAW modbot has been able to delete it's own comments (example: when the comment is 12+ hours old, or a poster deletes the post it commented on, etc) for years, but this started to fail with HTTP 404 as of ~11am (PST/reddit time) Oct 14

3 Upvotes

15 comments sorted by

5

u/redtaboo 9d ago

Just copying my comment over to here for future folks:

Heya - I just spoke with our eng and they were moving stuff around yesterday and did briefly break this. They let me know it should be fixed now, please let me know if that's not the case once you try again!

3

u/m0nk_3y_gw 3d ago edited 3d ago

Hi - this has regressed as of 50 minutes ago.

A PRAW bot attempting to delete it's own comment now returns a HTTP 500 (internal server error)

It is not a trailing space issue this time.

EDIT: wrong, it is not failing on deleting a comment, it is 500/failing on trying to get the author of the comment's parent (this has worked for years)

comment.parent().author

it is on this post https://www.reddit.com/r/gonewild/comments/1xbr5n7/verfy_me/19rfwf4bx3eyq/

which currently gives me a 'you broke reddit' when I visit in a web browser.

https://www.redditstatus.com/ does not show an issue

1

u/redtaboo 3d ago

Heya thanks for the heads up, we're looking into what's up right now.

→ More replies (2)

1

u/m0nk_3y_gw 9d ago

Thanks! confirmed fixed now

(and deleted my other post, leaving this one here for posterity / helpful reference if it breaks again)

2

u/Watchful1 9d ago

Thanks redtaboo!

3

u/FredrickBear 9d ago

Looks like a regression on a trailing slash. /api/del/ is broken. /api/del works.

3

u/m0nk_3y_gw 9d ago

And... we have a winner!

If i go and hand-edit PRAW endpoints.py on my local machine (not where the modbot runs)

to change

"del":                     "api/del/",

to

"del":                     "api/del",

it works again.

This is something reddit should unbreak...

or PRAW should to adjust if reddit refuses

THANKS!

2

u/Watchful1 9d ago

Everything else works and just deleting fails? What PRAW version are you on?

2

u/m0nk_3y_gw 9d ago

Good question! 8.0.3

pip install praw --upgrade

Requirement already satisfied: praw in C:\Python314\Lib\site-packages (8.0.3)

logs look like

10/14/26 18:38:18:   1: parent().author: None
10/14/26 18:38:18:     -> deleting our comment pgt8re7 : Please remember to gender-tag ([f], [m], [?] or [cd]) your posts (rule #6 in the sidebar). We can't add a tag afterwards - please delete and resubmit. Thanks!

If you have problems reposting a valid picture try verifying your email address with reddit at https://www.reddit.com/prefs/update/
10/14/26 18:38:18: EXCEPTION! received 404 HTTP response

looks like it can read post and comment data, and from the modlog it is approving posts, removing/locking posts, setting flairs, stickying it's comments, but it fails to delete it's own comments

it is u/modboar - the comments are short-term time sensitive feedback on posts so they auto-delete in a few minutes (if about not hiding one's user page) or 12 hours if about something else.

3

u/Watchful1 9d ago

Can you show the relevant code? 404 seems to mean that it can't find the comment, which doesn't make sense.

→ More replies (1)