6xx codes always indicate that a request failed completely and were not executed. Response level errors are present when the “success” parameter of the response is set to false, and will be structured like this:Įach object in the “errors” array has two members, “code,” which is a quoted integer from 601 to 799 and a “message” giving the plaintext reason for the error. The request should be retried as a POST with param _method=GET in the URL, and the rest of the querystring in the body of the request. This is typically due to an invalid Client Id or invalid Client Secret. The Identity endpoint can return a 401 Unauthorized error. It’s rare to hit this limit in most cases, but is somewhat common when retrieving large batches of records with long individual filter values such as a GUID. If it does change your request to a POST method, then input your query string as the request body with the additional parameter ‘_method=GET’. To avoid it, check against the length of your query string to see if it exceeds this limit. In most scenarios it unlikely to hit these limits, but adding a check to the size of the request and moving any records which cause the limit to be exceeded to a new request should prevent any circumstances which lead to this error being returned by any endpoints.Ĥ14 will be returned when the URI of a GET request exceeds 8KB. ![]() Marketo will return 413 if the Request Payload exceeds 1MB, or 10MB in the case of Import Lead. These are both recoverable through catching the error, modifying the request and retrying, but with smart coding practices, you should never encounter these in the wild. Under normal operating circumstances Marketo should only return two HTTP status code errors, 413 Request Entity Too Large, and 414 Request URI Too Long. For all error types, the HTTP reason phrase should not be evaluated as it is optional and subject to change. Record-Level – These errors are included in the “result” array of the JSON response, and are indicated on an individual record basis with the “status” field and “reasons” array.įor Response-Level and Record-Level error types, an HTTP status code of 200 is returned.Response-Level – These errors are included in the “errors” array of the JSON response.HTTP-Level – These errors are indicated by a 4xx code. ![]() The Marketo REST API can return three different types of errors under normal operation: While certain types of exceptions, such as expired authentication can be safely handled by reauthentication, others may require support interactions, and requests and responses will always be requested in this scenario. When developing for Marketo, it’s very important that requests and responses get logged when an unexpected exception is encountered.
0 Comments
Leave a Reply. |