{"_id":"55fc9b7b3c21291900e7e0ec","category":{"_id":"55fc9b7a3c21291900e7e0de","pages":["55fc9b7b3c21291900e7e0e8","55fc9b7b3c21291900e7e0e9","55fc9b7b3c21291900e7e0ea","55fc9b7b3c21291900e7e0eb","55fc9b7b3c21291900e7e0ec"],"version":"55fc9b793c21291900e7e0d7","__v":1,"project":"5553d36165e8260d0024419a","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-05-14T20:15:44.034Z","from_sync":false,"order":6,"slug":"conditions","title":"Conditions"},"user":"5553d33065e8260d00244199","version":{"_id":"55fc9b793c21291900e7e0d7","__v":12,"project":"5553d36165e8260d0024419a","createdAt":"2015-09-18T23:17:13.545Z","releaseDate":"2015-09-18T23:17:13.545Z","categories":["55fc9b7a3c21291900e7e0d8","55fc9b7a3c21291900e7e0d9","55fc9b7a3c21291900e7e0da","55fc9b7a3c21291900e7e0db","55fc9b7a3c21291900e7e0dc","55fc9b7a3c21291900e7e0dd","55fc9b7a3c21291900e7e0de","55fc9b7a3c21291900e7e0df","55fc9b7a3c21291900e7e0e0","55fc9b7a3c21291900e7e0e1","55fc9b7a3c21291900e7e0e2","55fc9b7a3c21291900e7e0e3","55fc9bad4c80910d00b9bece","56394a0c3539050d00082122","56394a2f68b11f0d0048c9ff","56394a462fc5520d001a4db3","56394a4c2fc5520d001a4db4","56394a5b049e420d00476b5c","56394a6a2fc5520d001a4db5","56394f791593e4190073a44b","567b3adfb56bac0d0019d8d9","569d590e5a2b060d008741eb","569ea93dffccd10d00a05c7f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"parentDoc":null,"__v":1,"project":"5553d36165e8260d0024419a","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-05-15T06:19:02.645Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"Many APIs return a HTTP 200 code even if the call has failed, so you may need to check specific headers in the response.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Content Errors\",\n  \"body\": \"APImetrics checks the content as returned for errors. This can be also used to stop a Work Flow if the content is incorrect.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Example\"\n}\n[/block]\nChecking that the Content-Type is always set to a specific value.\n\n- Enter a name in the Variable column (that is for your use)\n- Enter the header name in the Condition column (for instance, “Content-Type”). \n\nYou may choose to either check for it’s existence, or you may choose a comparison such as equal to (“==”) or not equal to (“!=”).\n\nThe result status may be changed as above, using the “On true” and “On false” columns.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/iLdsvCnhRU6VWJLSxemb_Screen%20Shot%202015-12-23%20at%204.16.12%20PM.png\",\n        \"Screen Shot 2015-12-23 at 4.16.12 PM.png\",\n        \"573\",\n        \"154\",\n        \"#3e3e91\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"Spotting failures when the API only returns HTTP 200","slug":"handling-http-200-error-messages","type":"basic","title":"Handling HTTP 200 Error Messages"}

Handling HTTP 200 Error Messages

Spotting failures when the API only returns HTTP 200

Many APIs return a HTTP 200 code even if the call has failed, so you may need to check specific headers in the response. [block:callout] { "type": "info", "title": "Content Errors", "body": "APImetrics checks the content as returned for errors. This can be also used to stop a Work Flow if the content is incorrect." } [/block] [block:api-header] { "type": "basic", "title": "Example" } [/block] Checking that the Content-Type is always set to a specific value. - Enter a name in the Variable column (that is for your use) - Enter the header name in the Condition column (for instance, “Content-Type”). You may choose to either check for it’s existence, or you may choose a comparison such as equal to (“==”) or not equal to (“!=”). The result status may be changed as above, using the “On true” and “On false” columns. [block:image] { "images": [ { "image": [ "https://files.readme.io/iLdsvCnhRU6VWJLSxemb_Screen%20Shot%202015-12-23%20at%204.16.12%20PM.png", "Screen Shot 2015-12-23 at 4.16.12 PM.png", "573", "154", "#3e3e91", "" ] } ] } [/block]