DennisHermannsen Posted December 23, 2022 Share Posted December 23, 2022 According to the documentation, user-friendly errors will only be shown to administrators: https://developers.whmcs.com/domain-registrars/module-functions/ Quote User-friendly error messages are exposed to administrators within the Admin Area. User-friendly error messages are never exposed to clients within the Client Area to protect the potentially sensitive nature of the message being returned. Is there no way to work around this? Creating your own custom error messages really would be great. It also wouldn't be an issue making sure that no sensitive information is shown to the client. An example: User tries to change their name servers to ns1.example.com, ns2.example.com and ns3.example.com. WHMCS just shows the general "An issue was encountered while updating the domain nameservers. Please contact support" message. The registry requires the name servers to be registered in their system, and ns1-n3.example.com are not registered. The registry would return an error code (eg. 2400) because the registry aren't aware of these name servers. We should be able to catch the error code and return a string like "Name server x is not known." To fix the error, the name server administrator registers their name servers with the registry. User then tries to change their name servers again but the registry also performs a name server check to see if the domain name exists on the name servers. Unfortunately, it doesn't. The registry returns another error code (eg. 2303). We can return "No DNS zone on name servers for domain" or something like that to the user. If the registry returns an error code that we're not catching, WHMCS would return a general error. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.