The JSON:API implementation catches exceptions which may be thrown during entity processing of write operations such as POST and PATCH. Previously, it only caught certain classes extending PHP's core exception types which were thrown in the serialization step.
Now, JSON:API catches the PHP base \InvalidArgumentException and \UnexpectedValueException. This allows for catching exceptions from other code, such as field item value setters. The serializer specific exceptions mentioned earlier extend from these. See the related change record Setting entity reference item value with entity of incorrect type now throws \InvalidArgumentException for an example.
Previously, these exceptions were only caught as more generic server exceptions and resulted in an HTTP 500 status code. These will now provide more context and a more accurate 422 Unprocessable Entity error.
Affected sites have JSON:API installed with the option to allow write operations enabled. If your client implementations depend on the 500 status code, they should be reviewed for compatibility with the 422 status code. Note that the 422 status code was already sent by JSON:AP under narrower circumstances, so should already be accepted on the client side.