diff --git a/graphql/error.go b/graphql/error.go index 4fe520b2852..f816bef6b8e 100644 --- a/graphql/error.go +++ b/graphql/error.go @@ -26,7 +26,8 @@ func ErrorOnPath(ctx context.Context, err error) error { if gqlErr.Path == nil { gqlErr.Path = GetPath(ctx) } - return gqlErr + // Return the original error to avoid losing any attached annotation + return err } return gqlerror.WrapPath(GetPath(ctx), err) }