Minor refactoring, error returns and e2e testing suite

This commit is contained in:
Joona Hoikkala
2026-02-03 23:27:11 +02:00
parent dc1a8f54b1
commit 48bfe812c0
12 changed files with 275 additions and 38 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ func (a *AcmednsAPI) getUserFromRequest(r *http.Request) (acmedns.ACMETxt, error
passwd := r.Header.Get("X-Api-Key")
username, err := getValidUsername(uname)
if err != nil {
return acmedns.ACMETxt{}, fmt.Errorf("invalid username: %s: %s", uname, err.Error())
return acmedns.ACMETxt{}, fmt.Errorf("invalid username: %s: %w", uname, err)
}
if validKey(passwd) {
dbuser, err := a.DB.GetByUsername(username)