diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2025-10-14 07:40:58 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2025-10-14 07:40:58 +0530 |
commit | 2f239481cdd750c2cbe85b012bdeb69841298c42 (patch) | |
tree | ab2e186632777200d4ba4ccf26503b1a4baa1dbe /errors/status.go | |
parent | 9de7dcb3b45a86ee0de0e2b6f3044a859ed5ea08 (diff) |
returning 'invalid quantity' error instead of 'invalid gst' in case of invalid quantityv0.23.1
Diffstat (limited to 'errors/status.go')
-rw-r--r-- | errors/status.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/errors/status.go b/errors/status.go index 0bbb7ba..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 @@ -42,6 +42,7 @@ func StatusCodeFromErr(err error) int { errors.Is(err, ErrPasswordTooLong) || errors.Is(err, ErrInvalidLoginMethod) || errors.Is(err, ErrNoItemVariants) || + errors.Is(err, ErrInvalidQuantityInStock) || errors.Is(err, ErrInvalidGSTPercentage) { return http.StatusBadRequest } |