# Random 404 errors when editing posts

**URL:** <https://meta.discourse.org/t/random-404-errors-when-editing-posts/167887>\
**Category:** Bug\
**Created:** [October 21, 2020, 3:55pm UTC](https://meta.discourse.org/t/random-404-errors-when-editing-posts/167887 "2020-10-21T15:55:20Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)\
**Post date:** [October 21, 2020, 3:55pm UTC](https://meta.discourse.org/t/random-404-errors-when-editing-posts/167887/1 "2020-10-21T15:55:20Z")

</div>

I’ve been getting random 404 errors when editing replies in my forum.

When edits work, they send a PUT request to the endpoint `/posts/:post_id` with a 200 response.

But when they don’t work, I can see in the developer tools a PUT request to `/post_replies/:post_id` that returns a 404. When I refresh the page, the errors go away and I’m able to save the edit correctly (via `/posts/:post_id`, the `:post_id` doesn’t change).

I’m not sure if there is a special condition that could make `/posts` turn into `/post_replies` by mistake or if it’s a different problem. I recently quadrupled my server’s RAM and I haven’t seen anything weird in the logs.

Any help is appreciated.

---

_[View the full topic](https://meta.discourse.org/t/random-404-errors-when-editing-posts/167887)._
