4 ms·
Another suggestion: put something like libphonenumber’s isPossibleNumber or isValidNumber on your server, on error run the query string through it. If it says t
by fwlr 4y ago
Another suggestion: put something like libphonenumber’s isPossibleNumber or isValidNumber on your server, on error run the query string through it. If it says that looks like a phone number, relay this information in the error response. A field in the JSON response like “info: Your query parameter looks like a phone number. If you are trying to get the geographical location of a phone from the phone number, please be aware this is not possible. [link to blogpost]” would hopefully jump out at people, particularly if you ask them to include the error response in their support request.
It’s an unprincipled hack, a bizarre dependency to add to your project, it probably feels like admitting defeat to the all powerful AI… but it does 90%-solve the problem.
- Nathanba 4y agoyeah I think maybe the way to solve this is to add some kind of API documentation that explicitly mentions that phone lookups aren't possible. ChatGPT will parse it eventually...