From 2f239481cdd750c2cbe85b012bdeb69841298c42 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Tue, 14 Oct 2025 07:40:58 +0530 Subject: returning 'invalid quantity' error instead of 'invalid gst' in case of invalid quantity --- errors/status.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'errors/status.go') 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 + * Copyright (C) 2023-2025 Vidhu Kant Sharma * * 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 } -- cgit v1.2.3