Skip to content

Commit 1f0e33a

Browse files
committed
chore: improve error message for failed workspace and prebuilt authorization
1 parent 471d3e8 commit 1f0e33a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coderd/database/dbauthz/dbauthz.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ func (q *querier) authorizePrebuiltWorkspace(ctx context.Context, action policy.
169169
if prebuiltErr = q.authorizeContext(ctx, action, workspace.AsPrebuild()); prebuiltErr == nil {
170170
return nil
171171
}
172-
return xerrors.Errorf("authorize context as prebuild: %w", errors.Join(workspaceErr, prebuiltErr))
172+
return xerrors.Errorf("authorize context failed for workspace (%v) and prebuilt (%w)", workspaceErr, prebuiltErr)
173173
}
174174

175-
return xerrors.Errorf("authorize context: %w", errors.Join(workspaceErr))
175+
return xerrors.Errorf("authorize context: %w", workspaceErr)
176176
}
177177

178178
type authContextKey struct{}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy