422 is saying that the content from the client was bad.
I’m thinking where the server didn’t raise an exception but something in its internal state didn’t add up. There are times when a distinction is made between those circumstances. It should be a 500.
This can happen when an error occurs in code that knows nothing about the web and the web layer fails to recognise the situation and doesn’t transform it to an appropriate http status code.