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

Function ChatUsageLimitExceededFrom

codersdk/chats.go:1915–1921  ·  view source on GitHub ↗

ChatUsageLimitExceededFrom extracts a structured chat usage limit response from an SDK error returned by chat mutation methods.

(err error)

Source from the content-addressed store, hash-verified

1913// ChatUsageLimitExceededFrom extracts a structured chat usage limit response
1914// from an SDK error returned by chat mutation methods.
1915func ChatUsageLimitExceededFrom(err error) *ChatUsageLimitExceededResponse {
1916 var limitErr *chatUsageLimitExceededError
1917 if !errors.As(err, &limitErr) {
1918 return nil
1919 }
1920 return &limitErr.response
1921}
1922
1923// ChatUsageLimitPeriod represents the time window for usage limits.
1924type ChatUsageLimitPeriod string

Calls 1

AsMethod · 0.80

Tested by 3

TestRegenerateChatTitleFunction · 0.74