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

Function StreamRetryPayload

coderd/x/chatd/chaterror/payload.go:23–40  ·  view source on GitHub ↗
(
	attempt int,
	delay time.Duration,
	classified ClassifiedError,
)

Source from the content-addressed store, hash-verified

21}
22
23func StreamRetryPayload(
24 attempt int,
25 delay time.Duration,
26 classified ClassifiedError,
27) *codersdk.ChatStreamRetry {
28 if classified.Message == "" {
29 return nil
30 }
31 return &codersdk.ChatStreamRetry{
32 Attempt: attempt,
33 DelayMs: delay.Milliseconds(),
34 Error: retryMessage(classified),
35 Kind: classified.Kind,
36 Provider: classified.Provider,
37 StatusCode: classified.StatusCode,
38 RetryingAt: time.Now().Add(delay),
39 }
40}

Calls 2

retryMessageFunction · 0.85
AddMethod · 0.65