MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getFreebuffRateLimitErrorMessage

Function getFreebuffRateLimitErrorMessage

cli/src/utils/error-handling.ts:118–127  ·  view source on GitHub ↗
(
  error: unknown,
)

Source from the content-addressed store, hash-verified

116}
117
118export const getFreebuffRateLimitErrorMessage = (
119 error: unknown,
120): string | null => {
121 const details = getCliApiErrorDetails(error)
122 if (details.statusCode !== 429) return null
123 if (details.errorCode === 'free_mode_rate_limited') {
124 return details.message ?? FREEBUFF_RATE_LIMIT_MESSAGE
125 }
126 return FREEBUFF_RATE_LIMIT_MESSAGE
127}
128
129export const getCountryBlockFromFreeModeError = (
130 error: unknown,

Callers 3

handleRunCompletionFunction · 0.90
handleRunErrorFunction · 0.90

Calls 1

getCliApiErrorDetailsFunction · 0.85

Tested by

no test coverage detected