Function
classifyStreamSilenceTimeout
(
attemptCtx context.Context,
provider string,
err error,
)
Source from the content-addressed store, hash-verified
| 856 | } |
| 857 | |
| 858 | func 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 | |
| 876 | func guardedStream( |
| 877 | parent context.Context, |