Specific Errors Scenarios

Domain extension is not given in the input. (10001)

$ curl -i https://api.deepinfo.com/v1/lookup/ssl?domain=
HTTP/1.1 400 BAD REQUEST
...
{
    "code": 10001,
    "reason": "Domain extension is not given in the input."
}

Domain extension in the given input is not valid. (10002)

$ curl -i https://api.deepinfo.com/v1/lookup/ssl?domain=deepinfo.coom
HTTP/1.1 400 BAD REQUEST
...
{
    "code": 10002,
    "reason": "Domain extension in the given input is not valid."
}

Domain subdomain in the given input is not valid. (10003)

$ curl -i https://api.deepinfo.com/v1/lookup/ssl?domain=project!.deepinfo.com
HTTP/1.1 400 BAD REQUEST
...
{
    "code": 10003,
    "reason": "Domain subdomain in the given input is not valid."
}

The given input is not valid FQDN. (11000)

$ curl -i https://api.deepinfo.com/v1/lookup/ssl?domain=deepinfo!.com
HTTP/1.1 400 BAD REQUEST
...
{
    "code": 11000,
    "reason": "The given input is not a valid fqdn."
}

When a system function timed out at the system level.

HTTP/1.1 200 OK
...
{
  "fqdn": "...",
  "check_date": "2021-04-07T07:56:39Z",
  "connection_status": "timeout",
  "parsed": "...",
  "certificate": "...",
  "parse_errors": null
}

When a connection is reset by the peer
If ConnectionResetError is raised, it will try three more times and wait for the request to be successful, if not, connection_status returns Reset.

HTTP/1.1 200 OK
...
{
  "fqdn": "...",
  "check_date": "2021-04-07T07:56:39Z",
  "connection_status": "reset",
  "parsed": "...",
  "certificate": "...",
  "parse_errors": null
}

When a connection is refused by the peer.

HTTP/1.1 200 OK
...
{
  "fqdn": "...",
  "check_date": "2021-04-07T07:56:39Z",
  "connection_status": "refused",
  "parsed": "...",
  "certificate": "...",
  "parse_errors": null
}

When IP address is not resolved.
For address-related errors by getaddrinfo and getnameinfo.

HTTP/1.1 200 OK
...
{
  "fqdn": "...",
  "check_date": "2021-04-07T07:56:39Z",
  "connection_status": "not_resolved",
  "parsed": "...",
  "certificate": "...",
  "parse_errors": null
}

Getting SSL and OS Error
This signifies some problem in the higher-level encryption and authentication layer that’s superimposed on the underlying network connection.

HTTP/1.1 200 OK
...
{
  "fqdn": "...",
  "check_date": "2021-04-07T07:56:39Z",
  "connection_status": "ssl_error",
  "parsed": "...",
  "certificate": "...",
  "parse_errors": null
}

Getting Parse Error
There is a certificate, but when there is an unexpected error during the certificate parse process, a response will be returned as below.

{
   "fqdn":"...",
   "check_date":"2021-04-12T09:32:57Z",
   "connection_status":"success",
   "parsed":null,
   "certificate":"MIICRzCCAbCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBCMUAwPgYDVQQGEzdDQTtTVD1PbnRhcmlvO0w9VG9yb250bztPPU1PRkk0NTAwZWFjNTY5YjA7Q049TU9GSTQ1MDA7MB4XDTE5MDQwMjE4MjczMVoXDTIxMDQwMTE4MjczMVowQjFAMD4GA1UEBhM3Q0E7U1Q9T250YXJpbztMPVRvcm9udG87Tz1NT0ZJNDUwMGVhYzU2OWIwO0NOPU1PRkk0NTAwOzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA5gRFxEtocr56OTTx0k/kDP7WVMePTSgL5pXQWNp86iTb6E26UadTBkIJXOnx+yTzyM5ozOB/Dq1lXaQ5rVuya6cEYC5LbQMfg+QACkR51jyjH6ENddh2fGgYBog9i0fIsusZYSYbHtZuN3wAOym44HlvMbjLdqaRT3I+FFBPkZMCAwEAAaNNMEswCQYDVR0TBAIwADAdBgNVHQ4EFgQUMOtRTfKyTr12CMNcS/+kXcilIcswHwYDVR0jBBgwFoAUMOtRTfKyTr12CMNcS/+kXcilIcswDQYJKoZIhvcNAQEFBQADgYEA2c/p6JlOYDljTOS379fG1p0OdFUjQSmwh+jT/DhkhD+rcdbvNePPMQjCja32HwYa5gWxberwrC+hqxe/cZWDC0mbAa2IfTe2UrleaTB+Ug3MUJKxi77U4y+YcEG7NnxiJocVhZCKpWkztGmqBv4qq0wuFkClg32uMpbNjUaMeDY=",
   "parse_errors":[
      "Country name must be a 2 character country code"
   ]
}