MCPcopy Index your code
hub / github.com/coder/coder / classifyStreamSilenceTimeout

Function classifyStreamSilenceTimeout

coderd/x/chatd/chatloop/chatloop.go:858–874  ·  view source on GitHub ↗
(
	attemptCtx context.Context,
	provider string,
	err error,
)

Source from the content-addressed store, hash-verified

856}
857
858func classifyStreamSilenceTimeout(
859 attemptCtx context.Context,
860 provider string,
861 err error,
862) error {
863 if !errors.Is(context.Cause(attemptCtx), errStreamSilenceTimeout) {
864 return err
865 }
866 if err == nil {
867 err = errStreamSilenceTimeout
868 }
869 return chaterror.WithClassification(err, chaterror.ClassifiedError{
870 Kind: codersdk.ChatErrorKindStartupTimeout,
871 Provider: provider,
872 Retryable: true,
873 })
874}
875
876func guardedStream(
877 parent context.Context,

Calls 2

WithClassificationFunction · 0.92
IsMethod · 0.45