Skip to content

Commit 2289f4d

Browse files
committed
Fix internal error logging
1 parent 00955e0 commit 2289f4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coderd/database/dbauthz/dbauthz.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (NotAuthorizedError) Unwrap() error {
4343
func logNotAuthorizedError(ctx context.Context, logger slog.Logger, err error) error {
4444
// Only log the errors if it is an UnauthorizedError error.
4545
internalError := new(rbac.UnauthorizedError)
46-
if err != nil && xerrors.As(err, internalError) {
46+
if err != nil && xerrors.As(err, &internalError) {
4747
logger.Debug(ctx, "unauthorized",
4848
slog.F("internal", internalError.Internal()),
4949
slog.F("input", internalError.Input()),

0 commit comments

Comments
 (0)