aboutsummaryrefslogtreecommitdiff
path: root/errors/status.go
diff options
context:
space:
mode:
Diffstat (limited to 'errors/status.go')
-rw-r--r--errors/status.go5
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) ||