Specific Errors Scenarios

Failed with dns.exception.DNSException
Note: We do not expect this exception to occur in an ideal world.

$ curl -i https://api.deepinfo.com/v1/lookup/dns?domain=deepinfo.com?type=A
HTTP/1.1 500 INTERNAL SERVER ERROR
...
{
    "code": -1,
    "reason": "An unexpected error has occurred."
}

No DNS type is provided as input (14000)

$ curl -i https://api.deepinfo.com/v1/lookup/dns?domain=deepinfo.com
HTTP/1.1 400 BAD REQUEST
...
{
    "code": 14000,
    "reason": "No dns type is provided as input"
}

Six DNS types requested (>5) (14001)

$ curl -i https://api.deepinfo.com/v1/lookup/dns?domain=deepinfo.com?type=A,NS,MX,TXT,CNAME,ANY
HTTP/1.1 400 BAD REQUEST
...
{
    "code": 14001,
    "reason": "6 dns types requested (>5)"
}

Request contains invalid DNS types (14002)

$ curl -i https://api.deepinfo.com/v1/lookup/dns?domain=deepinfo.com?type=ANY,ALL,FEATURED
HTTP/1.1 400 BAD REQUEST
...
{
    "code": 14002,
    "reason": "Request contains invalid dns types: {'ALL', 'FEATURED'}"
}

Too many requests are called

$ curl -i https://api.deepinfo.com/v1/lookup/dns/deepinfo.com?type=A,NS,MX,TXT,CNAME
HTTP/1.1 429 TOO MANY REQUESTS
...
{
    "code": 429,
    "reason": "5 requests of 'deepinfo.com' is rejected"
}