From 9f1c4dd9e6245d0f4e9ebe8d817c0fa4654c9aa2 Mon Sep 17 00:00:00 2001 From: 1e99 Date: Fri, 8 Nov 2024 16:03:00 +0100 Subject: [PATCH] use http package status for when password is too long --- routes/create_password.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/create_password.go b/routes/create_password.go index 0c57c73..3522e45 100644 --- a/routes/create_password.go +++ b/routes/create_password.go @@ -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 }