diff options
Diffstat (limited to 'errors/status.go')
-rw-r--r-- | errors/status.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/errors/status.go b/errors/status.go index 306ea27..708165a 100644 --- a/errors/status.go +++ b/errors/status.go @@ -1,5 +1,5 @@ /* openbills - Server for web based Libre Billing Software - * Copyright (C) 2023 Vidhu Kant Sharma <vidhukant@vidhukant.com> + * Copyright (C) 2023-2025 Vidhu Kant Sharma <vidhukant@vidhukant.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,6 +41,8 @@ func StatusCodeFromErr(err error) int { errors.Is(err, ErrPasswordTooShort) || errors.Is(err, ErrPasswordTooLong) || errors.Is(err, ErrInvalidLoginMethod) || + errors.Is(err, ErrNoItemVariants) || + errors.Is(err, ErrInvalidQuantityInStock) || errors.Is(err, ErrInvalidGSTPercentage) { return http.StatusBadRequest } |