HTTP status 415. An API key request can get this code.
The request body is not JSON.
Recovery
Send the body as JSON with the header Content-Type: application/json.
Branch on code, not on the text of detail. Give Affinity the requestId when you report a problem.