From 7f12e4fa01a2bf3ab25844f3d73af67881a587f1 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sat, 2 Sep 2023 23:12:52 +0530 Subject: added sign-in --- errors/status.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'errors/status.go') diff --git a/errors/status.go b/errors/status.go index eb59506..b0da1ae 100644 --- a/errors/status.go +++ b/errors/status.go @@ -35,6 +35,8 @@ func StatusCodeFromErr(err error) int { errors.Is(err, ErrInvalidGSTIN) || errors.Is(err, ErrEmptyBrandName) || errors.Is(err, ErrInvalidUnitPrice) || + errors.Is(err, ErrPasswordTooShort) || + errors.Is(err, ErrPasswordTooLong) || errors.Is(err, ErrInvalidGSTPercentage) { return http.StatusBadRequest } @@ -48,6 +50,7 @@ func StatusCodeFromErr(err error) int { // 409 if errors.Is(err, ErrNonUniqueGSTIN) || errors.Is(err, ErrNonUniquePhone) || + errors.Is(err, ErrNonUniqueUsername) || errors.Is(err, ErrNonUniqueEmail) || errors.Is(err, ErrNonUniqueWebsite) || errors.Is(err, ErrNonUniqueBrandName) || -- cgit v1.2.3