HTTP status 502. Only the Affinity app gets this code.
The invitation was saved, but Affinity could not send the invitation email.
Recovery
Send the invitation again (or choose Resend invitation). The pending invitation stays until it is accepted, declined, or revoked.
Branch on code, not on the text of detail. Give Affinity the requestId when you report a problem.