Auto Scaling
Developer Guide (API Version 2011-01-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Troubleshooting Auto Scaling

Auto Scaling provides specific and descriptive errors to help you troubleshoot problems.

Retrieving Errors

Typically, you want your application to check if a request generated an error before processing results. The easiest way to find out if an error occurred is to look for an Error node in the response.

XPath syntax provides a simple way to search for the presence of an Error node, as well as an easy way to retrieve the error code and message. The following code snippet uses Perl and the XML::XPath module to determine whether an error occurred during a request. If an error occurred, the code prints the first error code and message in the response.

use XML::XPath; 
my $xp = XML::XPath->new(xml =>$response); 
if ( $xp->find("//Error") ) 
{print "There was an error processing your request:\n", " Error code: ",
$xp->findvalue("//Error[1]/Code"), "\n", " ",
$xp->findvalue("//Error[1]/Message"), "\n\n"; }

Troubleshooting Tips

We recommend the following processes to diagnose and resolve problems with your Auto Scaling applications:

  • Verify that your XSL style sheets are valid.

    To do this, run your requests both with and without the XSL style sheet, to determine if the problem is in the request or in your style sheets.

  • Check the structure of your request.

    Each Auto Scaling operation has a reference page. Double-check that you are using parameters correctly. Try the request on one of the other locales, if other locales exist. Try your request with SOAP through your browser. This will help you determine if the problem lies with your code or your request or with Auto Scaling.

  • Look at the sample applications and use cases to see if those examples are performing similar operations.