mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
Ignore graphql context canceled errors (#3689)
This commit is contained in:
parent
89ed6e9a67
commit
c9c5b55721
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ package api
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
|
||||||
"github.com/99designs/gqlgen/graphql"
|
"github.com/99designs/gqlgen/graphql"
|
||||||
"github.com/stashapp/stash/pkg/logger"
|
"github.com/stashapp/stash/pkg/logger"
|
||||||
|
|
@ -13,7 +14,7 @@ func gqlErrorHandler(ctx context.Context, e error) *gqlerror.Error {
|
||||||
// log all errors - for now just log the error message
|
// log all errors - for now just log the error message
|
||||||
// we can potentially add more context later
|
// we can potentially add more context later
|
||||||
fc := graphql.GetFieldContext(ctx)
|
fc := graphql.GetFieldContext(ctx)
|
||||||
if fc != nil {
|
if fc != nil && !errors.Is(e, context.Canceled) {
|
||||||
logger.Errorf("%s: %v", fc.Path(), e)
|
logger.Errorf("%s: %v", fc.Path(), e)
|
||||||
|
|
||||||
// log the args in debug level
|
// log the args in debug level
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue