HTTP status 400. Only the Affinity app gets this code.
A dashboard request sent no Affinity-Mode, or a value other than test or live.
Recovery
Send test or live. API keys do not send this header, because the key sets the mode.
Branch on code, not on the text of detail. Give Affinity the requestId when you report a problem.