Skip to content

Commit c77c1b4

Browse files
authored
fix: Retry if there is no git auth user yet (#5316)
Fixes part of #4900.
1 parent b2dc60c commit c77c1b4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

coderd/workspaceagents.go

+3
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,9 @@ func (api *API) workspaceAgentsGitAuth(rw http.ResponseWriter, r *http.Request)
11541154
UserID: workspace.OwnerID,
11551155
})
11561156
if err != nil {
1157+
if errors.Is(err, sql.ErrNoRows) {
1158+
continue
1159+
}
11571160
httpapi.Write(ctx, rw, http.StatusInternalServerError, codersdk.Response{
11581161
Message: "Failed to get git auth link.",
11591162
Detail: err.Error(),

0 commit comments

Comments
 (0)