mr-karan / doggo

:dog: Command-line DNS Client for Humans. Written in Golang
https://doggo.mrkaran.dev/
GNU General Public License v3.0
2.9k stars 100 forks source link

ERROR i/o timeout not showing in json Output when --json #80

Closed sudoritz closed 2 months ago

sudoritz commented 11 months ago

doggo google.com A @4.2.2.12 --time --json

ERROR[2023-10-06T18:44:33-04:00] error looking up DNS records error="read udp 10.10.10.10:45326->4.2.2.12:53: i/o timeout"

When we get an ERROR in the response (and we have --json in the output) it would be nice to showcase this in --json as the error > we use this as a monitoring tool to see if our servers respond and if they dont we have to do different parsing. like to have full json error out too

mr-karan commented 2 months ago

Thanks for reporting this. Will be fixed in the next release

./bin/doggo.bin google.com A @4.2.2.12 --time --json
{
  "responses": [
    {
      "answers": null,
      "authorities": null,
      "questions": null
    }
  ],
  "error": "read udp 192.168.29.76:34713-\u003e4.2.2.12:53: i/o timeout"
}