From 9a8b816b1b9d1b96eff8a3f71162f4202547e569 Mon Sep 17 00:00:00 2001 From: maru Date: Thu, 28 Dec 2023 21:22:07 -0500 Subject: [PATCH] More verbose error response in register endpoint --- api/account.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/account.go b/api/account.go index 5696575..ee0ed2f 100644 --- a/api/account.go +++ b/api/account.go @@ -96,7 +96,7 @@ func HandleAccountRegister(w http.ResponseWriter, r *http.Request) { err = db.AddAccountRecord(uuid, request.Username, argon2.IDKey([]byte(request.Password), salt, argonTime, argonMemory, argonThreads, argonKeyLength), salt) if err != nil { - http.Error(w, "failed to add account record", http.StatusInternalServerError) + http.Error(w, fmt.Sprintf("failed to add account record: %s", err), http.StatusInternalServerError) return }