0

No such API command

The ticket is created but the error code is returned. This occurs on a ticket submission and it worked until we recently upgraded to this version: Version 8.3.42 (DB 778, Build 1)

flag

4 Answers

1

It's interesting that the FogBugz case is still being created if that error is bring returned, so you may have found a bug in our XML API. Thanks for reporting it!

We recently modified the XML API to report an error if the cmd parameter being specified is not recognized. Up until then, invalid cmds would not report any errors (i.e., they might appear to work), but also not actually do anything. FogBugz now reports the error to aid in debugging XML API requests.

What is the full URL that is being submitted to the FogBugz XML API? Or, at the very least, what is the value for cmd?

link|flag
0

Oddly, if I just go to the asp page and feed in the api commands I don't get an error. It's only when I use my little application that the error 27 is generated - specifically when the application checks for errors. Your api doesn't have an error 27 listed. Here is the XML:

api.asp?cmd=new&sTitle=test&sPriority=3&sProject=AAA Testing&aArea=Not Spam&ixCatagory=3&sCustomerEmail=22222222@mritechsupport.nasa.gov&sPersonAssignedTo=mritechsupport@nasa.gov&sEvent=Name: Arlene Smith, Phone: 200.400.8335, Project: AAA Testing, Reproduce: test, Occurance: test, Expected: test, Comments: test, Source: &dtDue=3/7/2011 9:14:52 AM&token=tjk6jmnglfbo3b756sach3qa6e4iiD

link|flag
Within the C# code: XmlDocument xml = new XmlDocument(); xml.Load(logoffUrl); // Check if error XmlNodeList nodeList = xml.GetElementsByTagName("error"); if (nodeList.Count != 0) { // Something is wrong string errorTxt = Utility.getProperty("errorHeader"); errorTxt += xml.InnerText; Utility.ShowMessageBox(errorTxt); } //the error is picked up here – Arlene Ogden Mar 7 2011 at 17:14
error 27 is no such command. But the case is created? Are you sure you aren't making two requests somehow? (Also, you have a typo, aArea should be sArea, but that's not the problem.) – Ted Mar 7 2011 at 18:11
0

The cases are created - I only get the error when the C# code requests back any errors as per the C# code I added above. If I go to the xml.asp and feed in the xml directly I don't get any errors back. I've tested it at least 10 times today. This started happening after we did our latest upgrade. The code works, the ticket gets submitted, then it checks to see if any errors were generated. The nodelist returns with the innerxml text string and the application pops the message even though the ticket is created.

link|flag
"xml.Load(logoffUrl);" Is that right? logoffUrl is a strange name to create a case. Is that a different URL, one that doesn't work? – Ted Mar 7 2011 at 22:12
0

No, logoffURL is the logoff portion of the c# code. Within the code calls

string errorTxt = Utility.getProperty("errorHeader"); string errorxml = xml.InnerXml.ToString(); errorTxt += xml.InnerText; Utility.ShowMessageBox(errorTxt);

It checks to see if there were any errors - and it will then generate a popup to the user.

Thanks.

link|flag
Any further updates? Thanks. – Arlene Ogden Mar 10 2011 at 12:47

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.