-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy patherror.html
72 lines (72 loc) · 3.57 KB
/
error.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html>
<head>
<title>Error Handling - Infusionsoft API</title>
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"/>
<link rel="stylesheet" href="bootstrap/css/bootstrap-extension.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<link href="google-code-prettify/src/prettify.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="google-code-prettify/src/prettify.js"></script>
</head>
<body onload="prettyPrint()">
<div class="container">
<img src="bootstrap/img/logo.png"><hr>
<div class="row">
<div class="span3 sidebar">
<div class="well" style="padding: 8px 0;">
<ul class="nav nav-list">
<li class="nav-header">Overview</li>
<li><a href="index.html">Introduction</a></li>
<li><a href="request.html">Requests</a></li>
<li><a href="response.html">Responses</a></li>
<li class="active"><a href="error.html">Errors</a></li>
<li><a href="api_console.html">API Console</a></li>
<li><a href="rate_limiting.html">API Rate Limiting</a></li>
<li><a href="changelog.html">Changelog</a></li>
<li class="nav-header">Services</li>
<li><a href="affiliateservice.html">AffiliateService</a></li>
<li><a href="contactservice.html">ContactService</a></li>
<li><a href="dataservice.html">DataService</a></li>
<li><a href="discountservice.html">DiscountService</a></li>
<li><a href="emailservice.html">EmailService</a></li>
<li><a href="fileservice.html">FileService</a></li>
<li><a href="invoiceservice.html">InvoiceService</a></li>
<li><a href="orderservice.html">OrderService</a></li>
<li><a href="productservice.html">ProductService</a></li>
<li><a href="searchservice.html">SearchService</a></li>
<li><a href="shippingservice.html">ShippingService</a></li>
<li><a href="webformservice.html">WebFormService</a></li>
</ul>
</div>
</div>
<div class="span9">
<h1>Error Reporting And Fault Handling</h1>
<p>The API is designed to fail gracefully providing a predictable and reliable way to handle errors. As a precaution, we recommend checking types and integrity before sending data as a way to minimize the interaction with the API, but in the event you have a problem the API supplies debugging information.</p>
<p>The standard API error response looks like this:</p>
<pre class="prettyprint">
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><i4>6</i4></value>
</member>
<member>
<name>faultString</name>
<value>error reason</value>
</member>
</struct>
</value>
</fault>
</methodResponse>
</pre>
<p>You can immediately recognize there is a problem because the only element in <methodResponse> is <fault>. You can parse this response for the fault code value if you're interacting with Infusionsoft support. For a customer facing error, You can parse out the value of faultString for the reason.</p>
<p>As a developer you've probably noticed that the ubiquity of this response lends itself to creating an error handling class for their project. </p>
</div>
</div>
</div>
</body>
</html>