error handling

This commit is contained in:
Matthew R Kasun
2023-02-10 06:58:00 -05:00
parent 98e66b7292
commit c7338888e4
3 changed files with 26 additions and 27 deletions

View File

@@ -112,9 +112,9 @@ func updateHost(w http.ResponseWriter, r *http.Request) {
if newHost.Name != currHost.Name {
networks := logic.GetHostNetworks(currHost.ID.String())
if err := mq.PublishHostDNSUpdate(currHost, newHost, networks); err != nil {
var dnsError *mq.DNSError
var dnsError *models.DNSError
if errors.Is(err, dnsError) {
for _, message := range err.(mq.DNSError).ErrorStrings {
for _, message := range err.(models.DNSError).ErrorStrings {
logger.Log(0, message)
}
} else {