Commits

Sebastian Rahlf committed e55cc02

Added example of how to access the original XML response (closes #31).

Comments (0)

Files changed (1)

docs/source/errors.rst

 
 .. autoexception:: amazonproduct.errors.AWSError
 
+Sometimes you may still want to access the original response. An example::
+
+    try:
+        result = api.item_lookup(
+            ['644209004461', '009800895250', '301357583001'], IdType='UPC')
+    except InvalidParameterValue, e:
+        print 'There was an invalid ItemId!' # '301357583001'
+        result = e.xml
+
+Although UPC ``301357583001`` will cause an error to be raised, you can
+retrieve the parsed response (here ``result`` is simply replaced with
+``e.xml``) and continue working on it as if nothing has happened.
+
+
 Occurring exceptions
 --------------------