Better Error Messages Than "422 Unprocessable Entity"

I’ve been running Discourse forums since some time prior to 2018. I can’t believe that we still have “422 Unprocessable Entity” errors. I’m not even talking about when using APIs, but when writing posts, creating automations, creating categories — basically all sorts of things in the web-based interface. These are incredibly non-user-friendly. Could we please have meaningful, potentially helpful, error messages about what exactly the problem is?

How about if I promise home-made (non-poisonous, of course) cookies? :pleading_face: :folded_hands:

2 Likes

Are these consistently reproducible in your experience? are there specific cases where you see them most often? Are you running any unofficial plugins? If you’re able to show us the specific request in your browser inspector that produced the error it would help significantly!

1 Like

What @awesomerobot said - plus are you running an up-to-date Discourse? It’s been a long time since I’ve ever encountered a 422 as a user :thinking:

1 Like

I’m running 2026.2.0-latest. I recently upgraded from a beta or pre-release version that was at least a few years old. The docker image label says “2.0.20240708-0023”, which sounds about right. I’m petty sure it was a 2.x release. I thought I’d upgraded (or disabled) every plug-in, theme, or theme component that I had. It’s certainly not complaining about any of them anymore.

I only have two plug-ins enabled that are not “By Discourse”:

While the installed “Suppress Category” plug-in seems to be unmaintained (or amazingly hasn’t required any updates?), that strikes me as an unlikely culprit to cause a problem while trying to post an entry or edit/create an automation.

I was pretty used to seeing or hearing about 422 error messages from people prior to the recent upgrade and I’m still seeing the odd one now and then. It’s not like I get dozens of these a week or anything. I just get enough or hear about them often enough and the reasons behind them are mystifying. It would be a lot easier to reproduce if I knew specifically what triggered them in a given situation, but I don’t always figure it out. That’s why I wanted better error messages. (-:

Weirdly, I’ve never thought of checking the inspector because I figured it’s a server-side error, not one that would show up in the console. I’ll try to make note of details, especially when I do figure out what causes one or how to fix it.

Thanks

1 Like

The latter, it simply kept working all this time (and still does) :grinning_face:

2 Likes