From 1924bfca2439829253df3598481034e5c586e3e2 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Mon, 9 Oct 2023 21:07:20 +0530 Subject: added route to add items to invoice --- errors/status.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'errors/status.go') diff --git a/errors/status.go b/errors/status.go index c9113a9..47820b5 100644 --- a/errors/status.go +++ b/errors/status.go @@ -64,6 +64,11 @@ func StatusCodeFromErr(err error) int { return http.StatusNotFound } + // 405 + if errors.Is(err, ErrCannotEditInvoice) { + return http.StatusMethodNotAllowed + } + // 409 if errors.Is(err, ErrNonUniqueGSTIN) || errors.Is(err, ErrNonUniquePhone) || -- cgit v1.2.3