fix: Retry if there is no git auth user yet (#5316)
Fixes part of #4900.
This commit is contained in:
1 parent
b2dc60c030
commit
c77c1b4bc2
1 file changed
+3
@@ -1154,6 +1154,9 @@ func (api *API) workspaceAgentsGitAuth(rw http.ResponseWriter, r *http.Request)
|
||||
UserID: workspace.OwnerID,
|
||||
})
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
continue
|
||||
}
|
||||
httpapi.Write(ctx, rw, http.StatusInternalServerError, codersdk.Response{
|
||||
Message: "Failed to get git auth link.",
|
||||
Detail: err.Error(),
|
||||
|
||||
Reference in new issue
Block a user