{"__v":9,"_id":"55fa37ca8065a10d004e5bbf","category":{"__v":7,"_id":"55fa37ca8065a10d004e5bb7","pages":["55fa37ca8065a10d004e5bbb","55fa37ca8065a10d004e5bbc","55fa37ca8065a10d004e5bbd","55fa37ca8065a10d004e5bbe","55fa37ca8065a10d004e5bbf","55fa37ca8065a10d004e5bc0","55fa3a948065a10d004e5bd5","55fa3c3ba663c00d00773dce","55fa4b8eaba81f0d00a115e4","56733ae758c4890d00bb548a","56734f9c4b2a680d00524e09","569d8eae3dbdc20d005feee8"],"project":"54e405191e51932d006abc39","version":"55fa37c88065a10d004e5bb6","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-02-18T03:20:58.779Z","from_sync":false,"order":0,"slug":"introduction","title":"Introduction"},"parentDoc":null,"project":"54e405191e51932d006abc39","user":"54e4044e8ef7552300409dcb","version":{"__v":7,"_id":"55fa37c88065a10d004e5bb6","project":"54e405191e51932d006abc39","createdAt":"2015-09-17T03:47:20.956Z","releaseDate":"2015-09-17T03:47:20.956Z","categories":["55fa37ca8065a10d004e5bb7","55fa37ca8065a10d004e5bb8","55fa37ca8065a10d004e5bb9","55fa37ca8065a10d004e5bba","55fca6bf34ae7c0d00ab8ea0","55ff80fd9e7ccf0d000a1d93","560220af7435de0d00fabd0d","56107f21bb9d920d00303e70","563e184077681a0d00d96a02","56fafc6596ec7e0e002ac85f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"REST V3","version_clean":"3.1.0","version":"3.1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-06T06:05:53.134Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":12,"body":"The API returns json with an error code and description in case of any error during the request as shown. In case the error is in a specific field, it also returns the field name in error object.\n\n## HTTP STATUS CODE REFERENCE\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"HTTP Status Code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"200 OK\",\n    \"0-1\": \"Worked as expected\",\n    \"2-0\": \"400 Bad Request\",\n    \"3-0\": \"401 Not Authorized\",\n    \"8-0\": \"500 Server Error\",\n    \"8-1\": \"Internal Server Error\",\n    \"3-1\": \"Authentication Error\",\n    \"2-1\": \"Bad request to API. Missing a field or an invalid field\",\n    \"1-0\": \"202 Accepted\",\n    \"1-1\": \"Accepted, but not final response\",\n    \"4-0\": \"402 Request Failed\",\n    \"4-1\": \"Request to the API failed\",\n    \"5-0\": \"404 Not Found\",\n    \"5-1\": \"Cannot be Found\",\n    \"6-0\": \"409 Conflict\",\n    \"6-1\": \"Incorrect Values Supplied (eg. Insufficient balance, wrong MFA response, incorrect micro deposits, etc.)\",\n    \"7-0\": \"429 Too Many Requests\",\n    \"7-1\": \"Too many requests hit the API too quickly.\"\n  },\n  \"cols\": 2,\n  \"rows\": 9\n}\n[/block]\n## ERROR CODES REFERENCE\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"ERROR_CODE\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"0\",\n    \"0-1\": \"Success\",\n    \"1-0\": \"10\",\n    \"1-1\": \"Accepted, but action pending\",\n    \"2-0\": \"100\",\n    \"2-1\": \"Incorrect Client Credentials\",\n    \"3-0\": \"110\",\n    \"3-1\": \"Incorrect User Credentials\",\n    \"4-0\": \"120\",\n    \"4-1\": \"Unauthorized Fingerprint\",\n    \"5-0\": \"200\",\n    \"5-1\": \"Error in Payload (Error in payload formatting)\",\n    \"6-0\": \"300\",\n    \"6-1\": \"Unauthorized action (User/Client not allowed to perform this action)\",\n    \"7-0\": \"400\",\n    \"7-1\": \"Incorrect Values Supplied (eg. Insufficient balance, wrong MFA response, incorrect micro deposits)\",\n    \"11-0\": \"500\",\n    \"11-1\": \"Server Error\",\n    \"8-0\": \"404\",\n    \"8-1\": \"Object not found\",\n    \"9-0\": \"429\",\n    \"9-1\": \"Too many requests hit the API too quickly.\",\n    \"10-0\": \"450\",\n    \"10-1\": \"Idempotency key already in use\"\n  },\n  \"cols\": 2,\n  \"rows\": 12\n}\n[/block]\n## Sample Error Format\n\nFollowing is the sample error format for our APIs\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"error\\\": {\\n    \\\"en\\\": \\\"<user:id> not valid\\\"\\n  },\\n  \\\"error_code\\\": \\\"400\\\",\\n  \\\"http_code\\\": \\\"409\\\",\\n  \\\"success\\\": false\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n> Please remember to check the HTTP status code and the JSON associated with the error to better understand what exactly went wrong. Specially `error_code` & `error`.","excerpt":"Common Errors returned by Synapse & their formats","slug":"errors","type":"basic","title":"Errors"}

Errors

Common Errors returned by Synapse & their formats

The API returns json with an error code and description in case of any error during the request as shown. In case the error is in a specific field, it also returns the field name in error object. ## HTTP STATUS CODE REFERENCE [block:parameters] { "data": { "h-0": "HTTP Status Code", "h-1": "Description", "0-0": "200 OK", "0-1": "Worked as expected", "2-0": "400 Bad Request", "3-0": "401 Not Authorized", "8-0": "500 Server Error", "8-1": "Internal Server Error", "3-1": "Authentication Error", "2-1": "Bad request to API. Missing a field or an invalid field", "1-0": "202 Accepted", "1-1": "Accepted, but not final response", "4-0": "402 Request Failed", "4-1": "Request to the API failed", "5-0": "404 Not Found", "5-1": "Cannot be Found", "6-0": "409 Conflict", "6-1": "Incorrect Values Supplied (eg. Insufficient balance, wrong MFA response, incorrect micro deposits, etc.)", "7-0": "429 Too Many Requests", "7-1": "Too many requests hit the API too quickly." }, "cols": 2, "rows": 9 } [/block] ## ERROR CODES REFERENCE [block:parameters] { "data": { "h-0": "ERROR_CODE", "h-1": "Description", "0-0": "0", "0-1": "Success", "1-0": "10", "1-1": "Accepted, but action pending", "2-0": "100", "2-1": "Incorrect Client Credentials", "3-0": "110", "3-1": "Incorrect User Credentials", "4-0": "120", "4-1": "Unauthorized Fingerprint", "5-0": "200", "5-1": "Error in Payload (Error in payload formatting)", "6-0": "300", "6-1": "Unauthorized action (User/Client not allowed to perform this action)", "7-0": "400", "7-1": "Incorrect Values Supplied (eg. Insufficient balance, wrong MFA response, incorrect micro deposits)", "11-0": "500", "11-1": "Server Error", "8-0": "404", "8-1": "Object not found", "9-0": "429", "9-1": "Too many requests hit the API too quickly.", "10-0": "450", "10-1": "Idempotency key already in use" }, "cols": 2, "rows": 12 } [/block] ## Sample Error Format Following is the sample error format for our APIs [block:code] { "codes": [ { "code": "{\n \"error\": {\n \"en\": \"<user:id> not valid\"\n },\n \"error_code\": \"400\",\n \"http_code\": \"409\",\n \"success\": false\n}", "language": "json" } ] } [/block] > Please remember to check the HTTP status code and the JSON associated with the error to better understand what exactly went wrong. Specially `error_code` & `error`.