HTTP status 422. Only the Affinity app gets this code.
The NPI is not a valid 10-digit NPI.
Recovery
Check the 10 digits of the NPI and enter it again.
Branch on code, not on the text of detail. Give Affinity the requestId when you report a problem.