Error Handling

Handling errors

An example error returned by Gravito API consists of 4 properties
1
{
2
"ErrorCode":401,
3
"GravitoErrorCode":"GRA7004",
4
"Description":"Please review your access credentials for the api: DomainKey",
5
"DocumentationLink":"docs.gravito.net"
6
}
Copied!
The properties are
  • ErrorCode : The HTML error code
  • GravitoErrorCode: The Gravito specific errorcode. In case you contact support, please refer to this error code and the description
  • Description: Clear and concise information about what has goes wrong
  • DocumentationLink: Where ever applicable, a link to the relevant documentation.
When the API returns a status other than 200, we add an error code in the message body. This table enumerates and describes all of the possible error codes.
Error Code
GravitoCode
Description
Remarks
415
GRA7001
I dont understand? Are you missing some content !!
You should read the docs and pass the correct message to the API. Docs are here
409
GRA7002
DataSet already mapped
The data set your were trying to map is already present with the user.
404
GRA7003
Not Found
Well, something from your request is not found. May be the user or may be your domain! Better not try again.
401
GRA7004
Please review your access credentials for the GravitoAPI
Please check your domain access key or validate the Key provided by the user.
405
GRA7005
The access has not yet been granted by the end user
You need to wait or try again. The end user has not yet given access to your data set. You can always try again after some time.
415
GRA7006
This is not how you talk to an API !!.
Some mandatory params or body is missing
500
GRA7007
Something really bad happened. Call 911 !!
You can start panicking now!
Last modified 3yr ago
Copy link