More verbose error response in register endpoint

pull/1/head
maru 2023-12-28 21:22:07 -05:00
parent ee0326da0e
commit 9a8b816b1b
No known key found for this signature in database
GPG Key ID: 37689350E9CD0F0D
1 changed files with 1 additions and 1 deletions

View File

@ -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) err = db.AddAccountRecord(uuid, request.Username, argon2.IDKey([]byte(request.Password), salt, argonTime, argonMemory, argonThreads, argonKeyLength), salt)
if err != nil { 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 return
} }