Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Mar 2009
    Posts
    11

    Default Error detection in API 1

    I'm probably missing something, but is there a way to determine that there has been an error on an API1 call by looking at the returned XML? Unlike API2 which seems to reserve the result tag for this, API1 seems to use the result tag the same way in cases of success or failure.

    Thanks,
    Karim

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by k_shehadeh View Post
    I'm probably missing something, but is there a way to determine that there has been an error on an API1 call by looking at the returned XML? Unlike API2 which seems to reserve the result tag for this, API1 seems to use the result tag the same way in cases of success or failure.

    Thanks,
    Karim
    There's no flag set like <error>1</error> with API1 calls. However, if there is a failure, the result tag will typically indicate what the cause of the failure is. In some cases such as creating an email account on a cPanel account that is not allowed to have email accounts, the result tag may be blank (e.g. <result />).

Similar Threads & Tags
Similar threads

  1. cpanel api error please help
    By andylee in forum cPanel Developers
    Replies: 5
    Last Post: 10-14-2011, 12:57 AM
  2. error creating account with API
    By ian.metrotechpc in forum cPanel Developers
    Replies: 1
    Last Post: 02-15-2011, 12:09 AM
  3. api file_get_contents() error
    By danny0n in forum cPanel Developers
    Replies: 5
    Last Post: 07-13-2010, 12:40 PM
  4. XML-API Posible Error
    By paulipv in forum cPanel Developers
    Replies: 1
    Last Post: 07-09-2009, 01:49 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube