MCPcopy Index your code
hub / github.com/coder/coder / IsNotAuthorizedError

Function IsNotAuthorizedError

coderd/database/dbauthz/dbauthz.go:66–75  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

64}
65
66func IsNotAuthorizedError(err error) bool {
67 if err == nil {
68 return false
69 }
70 if xerrors.Is(err, ErrNoActor) {
71 return true
72 }
73
74 return xerrors.As(err, &NotAuthorizedError{})
75}
76
77func logNotAuthorizedError(ctx context.Context, logger slog.Logger, err error) error {
78 // Only log the errors if it is an UnauthorizedError error.

Callers 15

postUserMethod · 0.92
deleteUserMethod · 0.92
putUserRolesMethod · 0.92
deleteTemplateMethod · 0.92
patchWorkspaceACLMethod · 0.92
getChatACLMethod · 0.92
patchChatACLMethod · 0.92
aiProvidersListMethod · 0.92
aiProvidersCreateMethod · 0.92
writeAIProviderErrorFunction · 0.92
auditLogsMethod · 0.92

Calls 2

AsMethod · 0.80
IsMethod · 0.45

Tested by 6

TestAsNoActorFunction · 0.74
TestInTXFunction · 0.74