Skip to content

Commit 080e6f0

Browse files
committed
chore: make workspace sdk dialer fail fast for authnz errors
1 parent b0ba798 commit 080e6f0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

codersdk/workspacesdk/dialer.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ var permanentErrorStatuses = []int{
2424
http.StatusBadRequest, // returned if API mismatch
2525
http.StatusNotFound, // returned if user doesn't have permission or agent doesn't exist
2626
http.StatusInternalServerError, // returned if database is not reachable,
27+
http.StatusUnauthorized, // returned if user is not authenticated
28+
http.StatusForbidden, // returned if user is not authorized
2729
}
2830

2931
type WebsocketDialer struct {

0 commit comments

Comments
 (0)