diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-10-09 21:07:20 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-10-09 21:07:20 +0530 |
commit | 1924bfca2439829253df3598481034e5c586e3e2 (patch) | |
tree | 6b82a091ae97e1980fe0ff3f3fb3eaa726a6d6ad /errors/status.go | |
parent | b643f7852f93f73843aa5f52f9b4545321713e10 (diff) |
added route to add items to invoicev0.0.12
Diffstat (limited to 'errors/status.go')
-rw-r--r-- | errors/status.go | 5 |
1 files changed, 5 insertions, 0 deletions
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) || |