Skip to content

Commit 100c948

Browse files
authored
Log request path if ACL is not found (#34)
1 parent de9d97d commit 100c948

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

common.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (c Config[T]) Get(_ context.Context, path string) (v T, err error) {
6868

6969
p := strings.Split(path, "/")
7070
if len(p) < 4 {
71-
return v, fmt.Errorf("path has not enough parts")
71+
return v, fmt.Errorf("path has not enough parts: %s", path)
7272
}
7373

7474
var (
@@ -78,12 +78,12 @@ func (c Config[T]) Get(_ context.Context, path string) (v T, err error) {
7878
)
7979

8080
if packageName != "rpc" {
81-
return v, fmt.Errorf("path doesn't include rpc")
81+
return v, fmt.Errorf("path doesn't include rpc: %s", path)
8282
}
8383

8484
v, ok := c[serviceName][methodName]
8585
if !ok {
86-
return v, fmt.Errorf("acl not found")
86+
return v, fmt.Errorf("acl not defined for path: %s", path)
8787
}
8888

8989
return v, nil

0 commit comments

Comments
 (0)