QuantumNous/new-api · warning · Error
Please try again later.
Error message
Please try again later.
What it means
Thrown by requireSuccessfulFlowRows in the dashboard flow/quota selection lib when a flow API response has success:false and carries no message of its own. It is the fallback string passed by the caller (default 'Please try again later.'), surfaced to the dashboard's error display state via flowDisplayState(isError). It represents a failed flow-quota fetch with an unspecified server reason.
Source
Thrown at web/src/features/dashboard/lib/flow-selection.ts:37
import type {
FlowQuotaDataItem,
FlowUserFilterOption,
} from '@/features/dashboard/types'
export type FlowDisplayState = 'loading' | 'error' | 'empty' | 'chart'
export interface FlowResponse {
success: boolean
data?: FlowQuotaDataItem[]
message?: string
}
export function requireSuccessfulFlowRows(
response: FlowResponse,
fallbackMessage: string
): FlowQuotaDataItem[] {
if (!response.success) {
throw new Error(response.message || fallbackMessage)
}
return response.data ?? []
}
export function flowDisplayState(options: {
isLoading: boolean
isError: boolean
linkCount: number
themeReady: boolean
}): FlowDisplayState {
if (options.isLoading) return 'loading'
if (options.isError) return 'error'
if (options.linkCount === 0) return 'empty'
if (!options.themeReady) return 'loading'
return 'chart'
}
export function compactFlowSelectionLabel(count: number): string {View on GitHub (pinned to e2c7aa7b10)
Solutions
- Inspect the failing flow request's response body in the browser network tab to find the real failure (status code plus envelope).
- Check backend logs for the corresponding request to find the unnamed error.
- Retry after the backend recovers; if the response can carry a message, have the backend include one so the UI shows the true cause instead of the fallback.
Defensive patterns
Strategy: try-catch
Type guard
function isFlowResponse(value: unknown): value is FlowResponse {
return typeof value === 'object' && value !== null && typeof (value as any).success === 'boolean'
} Try / catch
try {
rows = requireSuccessfulFlowRows(response, t('Please try again later.'))
} catch (error) {
// flowDisplayState({isError:true}) already renders an error state; keep the message for tooltips
} Prevention
- Have the backend always attach a message when returning success:false so the fallback rarely fires
- Use React Query retry:1 for flow endpoints to absorb single-shot backend hiccups
When it happens
Trigger: Any dashboard flow request whose response JSON has success:false and an empty/absent message field — e.g. GET of flow quota rows returning {success:false} with no message.
Common situations: Backend exception without a localized message; gateway returning a bare failure envelope; rate limiting or partial outage returning success:false; version skew where a new field is required but missing and the backend fails generically.
Related errors
AI-assisted analysis of QuantumNous/new-api@e2c7aa7b10 (2026-08-15).
Data as JSON: /api/errors/eadaf501ae843d40.
Report an issue: GitHub.