mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: Retry if there is no git auth user yet (#5316)
Fixes part of #4900.
This commit is contained in:
@@ -1154,6 +1154,9 @@ func (api *API) workspaceAgentsGitAuth(rw http.ResponseWriter, r *http.Request)
|
|||||||
UserID: workspace.OwnerID,
|
UserID: workspace.OwnerID,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if errors.Is(err, sql.ErrNoRows) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
httpapi.Write(ctx, rw, http.StatusInternalServerError, codersdk.Response{
|
httpapi.Write(ctx, rw, http.StatusInternalServerError, codersdk.Response{
|
||||||
Message: "Failed to get git auth link.",
|
Message: "Failed to get git auth link.",
|
||||||
Detail: err.Error(),
|
Detail: err.Error(),
|
||||||
|
|||||||
Reference in New Issue
Block a user