Refine 404 diagnostic labeling for Dynu API errors

This commit is contained in:
beatz174-bit
2026-04-29 12:47:01 +10:00
parent 64dfb63419
commit f60a76327d
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -67,6 +67,7 @@ func TestDiagnosticSummary(t *testing.T) {
{name: "non api error", err: os.ErrNotExist, summary: "Unable to list Dynu domains", want: "Unable to list Dynu domains"},
{name: "auth error", err: &dynuclient.APIError{StatusCode: 401, Type: "Unauthorized", Message: "invalid"}, summary: "Unable to list Dynu domains", want: "Unable to list Dynu domains (authentication failed)"},
{name: "not found", err: &dynuclient.APIError{StatusCode: 404, Type: "Not Found", Message: "missing"}, summary: "Unable to resolve Dynu domain from hostname", want: "Unable to resolve Dynu domain from hostname (not found)"},
{name: "404 validation exception", err: &dynuclient.APIError{StatusCode: 404, Type: "Request Exception", Message: "Invalid."}, summary: "Unable to update Dynu DNS record", want: "Unable to update Dynu DNS record"},
}
for _, tc := range tests {