You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 17, 2022. It is now read-only.
Is your feature request related to a problem? Please describe.
At current, a user would need to perform their own validation after running the execute method to confirm if the API command was successful.
Describe the solution you'd like
Have the WHMCSAPI wrapper check for an error in the API JSON response and throw a WHMCSAPI\Exception\ErrorException if the command did not succeed. The exception message would be that returned by the API.
Although on by default, this should be able to be disabled, and the full error JSON response provided instead of throwing an exception.
Describe alternatives you've considered
There are no other alternatives, without having to document how to capture an error in detail. By implementing this feature, simply wrapping execute in a try/catch (as already advised) would also capture any error.