SpamExperts / cpanel-addon

WHM/cPanel add-on for providing integration with SpamExperts services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Show meaningful error details when API communication failure

dreasvandonselaar opened this issue · comments

Whenever there are issues communicating with the controlpanel API, a generic error is returned:

Unable to communicate with the controlpanel API: CRITICAL

We need to ensure a more meaningful response is provided, e.g.:

  • "Unable to communicate with the controlpanel API: username/password invalid"
  • "Unable to communicate with the controlpanel API: WHM prospamfilter API token is missing"
  • "Unable to communicate with the controlpanel API: WHM prospamfilter API token is invalid"
  • "Unable to communicate with the controlpanel API: Unable to get a response from URL XXX"

Possibly there are more scenarios we should handle.