Help with enforcing unique phone number

I am trying to enforce phone number uniqueness using the technique outlined in this Knowledge Solution post however the last part is a bit hand wavy- and I’m not sure what to do.

It says to “throw an error if there is a match” and “the error message text can be customized”
I figured out that when I throw an error it triggers the Custom Prompt "mfa-phone-enrollment": "sms-authenticator-error"
I would like to customize it to say something like “This phone number is already is use please try another” but I’m afraid to do that, because sms-authenticator-error seems like its probably a pretty generic error that could get used via a lot of other circumstances and I’m not sure I want to customize it to talk about phone number uniqueness if it might be shown for other errors. and customizing it to say “We had a trouble sending this SMS, it might be that its being used or it might be something else” doesn’t sound great :yum:

What are my options in this situation? Is there a way of knowing what other errors trigger that prompt, or sending a message to the prompt as a variable, so it can use it instead of hardcoded text, or triggering a specific prompt that I can dedicate to just phone number uniqueness?