Skip to content

Commit

Permalink
add nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
mistermoe committed Oct 4, 2024
1 parent 764de63 commit 49a4165
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ func (s *Service) callWithRequest(

module := verbRef.Module

if currentCaller.Module != module && !verb.IsExported() {
if currentCaller != nil && currentCaller.Module != module && !verb.IsExported() {
observability.Calls.Request(ctx, req.Msg.Verb, start, optional.Some("invalid request: verb not exported"))
return nil, connect.NewError(connect.CodePermissionDenied, fmt.Errorf("verb %q is not exported", verbRef))
}
Expand Down

0 comments on commit 49a4165

Please sign in to comment.