aboutsummaryrefslogtreecommitdiff
path: root/errors/status.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2023-09-03 16:18:20 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2023-09-03 16:18:20 +0530
commit776522d8741752832981b17ec81deb11a298ef57 (patch)
treef7c0654f2b3dbc475c2a32daa5c623eec0ffce4a /errors/status.go
parent95dfc551f7eaaf6e8ebdefce1b733951354ac40d (diff)
different customers for different users
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 4767aeb..1fa33d1 100644
--- a/errors/status.go
+++ b/errors/status.go
@@ -49,6 +49,11 @@ func StatusCodeFromErr(err error) int {
return http.StatusUnauthorized
}
+ // 403
+ if errors.Is(err, ErrForbidden) {
+ return http.StatusForbidden
+ }
+
// 404
if errors.Is(err, ErrNotFound) ||
errors.Is(err, ErrBrandNotFound) {