Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf34592f

Browse files
authored
fix(coderd): skip logging error for cancelled query in agent report stats (#12730)
1 parent951dfaa commitf34592f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎coderd/workspaceagents.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,13 @@ func (api *API) workspaceAgentReportStats(rw http.ResponseWriter, r *http.Reques
11711171
templateSchedule,err:= (*(api.TemplateScheduleStore.Load())).Get(ctx,api.Database,workspace.TemplateID)
11721172
// If the template schedule fails to load, just default to bumping without the next transition and log it.
11731173
iferr!=nil {
1174+
// There's nothing we can do if the query was canceled, the
1175+
// client most likely went away so we just return an internal
1176+
// server error.
1177+
ifdatabase.IsQueryCanceledError(err) {
1178+
httpapi.InternalServerError(rw,err)
1179+
return
1180+
}
11741181
api.Logger.Error(ctx,"failed to load template schedule bumping activity, defaulting to bumping by 60min",
11751182
slog.F("workspace_id",workspace.ID),
11761183
slog.F("template_id",workspace.TemplateID),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp