mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix(coderd): prevent logging error for query cancellation in watchWorkspaceAgentMetadata
(#10843)
This commit is contained in:
committed by
GitHub
parent
d58239b9ec
commit
6ecba0fda7
@ -1979,7 +1979,7 @@ func (api *API) watchWorkspaceAgentMetadata(rw http.ResponseWriter, r *http.Requ
|
||||
Keys: payload.Keys,
|
||||
})
|
||||
if err != nil {
|
||||
if !errors.Is(err, context.Canceled) {
|
||||
if !database.IsQueryCanceledError(err) {
|
||||
log.Error(ctx, "failed to get metadata", slog.Error(err))
|
||||
_ = sseSendEvent(ctx, codersdk.ServerSentEvent{
|
||||
Type: codersdk.ServerSentEventTypeError,
|
||||
|
Reference in New Issue
Block a user