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

Function getFreeModeUnavailableErrorMessage

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

Source from the content-addressed store, hash-verified

154}
155
156export const getFreeModeUnavailableErrorMessage = (
157 error: unknown,
158): string => {
159 const details = getCliApiErrorDetails(error)
160 const block = getCountryBlockFromFreeModeError(error)
161 if (block?.countryBlockReason === 'anonymous_network') {
162 return `${IS_FREEBUFF ? 'Freebuff' : 'Free mode'} cannot be used from ${formatFreebuffHardBlockedPrivacySignals(
163 block.ipPrivacySignals,
164 )} traffic. Please disable it and try again.`
165 }
166 return details.message ?? FREE_MODE_UNAVAILABLE_MESSAGE
167}
168
169/**
170 * Freebuff waiting-room gate errors returned by /api/v1/chat/completions.

Callers 3

handleRunCompletionFunction · 0.90
handleRunErrorFunction · 0.90

Tested by

no test coverage detected