use http package status for when password is too long

This commit is contained in:
1e99 2024-11-08 16:03:00 +01:00
parent 0381cb13ba
commit 9f1c4dd9e6

View file

@ -23,7 +23,7 @@ func CreatePassword(store storage.Store, maxLength int, encoding *base64.Encodin
}
if len(reqBody.Password) > maxLength {
http.Error(res, "Password too long", 413) // Payload Too Large
http.Error(res, "Password too long", http.StatusRequestEntityTooLarge)
return
}