The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error detection in API 1

Discussion in 'cPanel Developers' started by k_shehadeh, May 24, 2009.

  1. k_shehadeh

    k_shehadeh Member

    Joined:
    Mar 27, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    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. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    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 />).
     
Loading...

Share This Page