Handling errors when working with the DRN
There are certain errors that are possible when working with the DRN API:
General error format
When the DRN API cannot process your request, it will return an error in the following format:
{
"error": {
"code": "fixed_code",
"message": "descriptive error message"
}
}
The code
is fixed inside a version, but the message
can be updated to be more clear. Only the code
value compatibility is guaranteed inside a specific version !
For specific errors related to authentication, versioning, and rate limiting please refer to the specific reference pages.
Unknown resource path
If a request is made to an unknown resource path (the part after the domain), an HTTP 404 error will be returned:
// HTTP Status 404
{
"error": {
"code": "http.not_found",
"message": "not found"
}
The only valid resource path (the part that goes after fpjs.io) is drn
:
Invalid visitor_id
parameter.
visitor_id
parameter.If the visitor_id
parameter that was provided is not known to the DRN API, e.g. if it's not generated by our Android SDK or is unknown entirely, an HTTP 404 error will be returned:
// HTTP Status 404
{
"error": {
"code": "http.not_found",
"message": "visitor_id is not found"
}
}
Invalid signals
parameter
signals
parameterA request without at least one signals
parameter will return an HTTP 400 error:
// HTTP Status 400
{
"error": {
"code": "invalid_signals_parameter",
"message": "Invalid `signals` query parameter"
}
Empty response
If you requested the signals from a device with activity older than 30 days, you'll get an empty state response:
"regionalActivity": [
// will be at 30 days in the past in RFC3369 format, UTC timezone
"startDate": "2024-09-01T23:12:59Z",
"endDate": "2024-10-01T23:12:59Z",
"countries": []
},
"suspectScore": {
// will be at 30 days in the past in RFC3369 format, UTC timezone
"startDate": "2024-09-01T23:12:59Z",
"endDate": "2024-10-01T23:12:59Z",
"minimum": {
"value": 0,
"signals": {}
},
"maximum": {
"value": 0,
"percentile": 0
"signals": {}
}
},
"timestamps": {
"firstSeenAt": "2024-09-01T00:00:00Z" // format RFC3339, equal to current API version
"lastSeenAt": "2024-09-01T00:00:00Z" // format RFC3339, equal to current API version
}