mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
Add failure notice resolver for usage records
This commit is contained in:
@@ -142,6 +142,17 @@ export interface RequestErrorFlow {
|
||||
summary_source?: string | null
|
||||
}
|
||||
|
||||
export interface RequestSchedulingFailure {
|
||||
source?: string | null
|
||||
reason?: string | null
|
||||
reason_label?: string | null
|
||||
title?: string | null
|
||||
message?: string | null
|
||||
reason_summary?: string | null
|
||||
status_code?: number | null
|
||||
no_upstream_attempt?: boolean | null
|
||||
}
|
||||
|
||||
export interface RequestDetail {
|
||||
id: string // UUID
|
||||
request_id: string
|
||||
@@ -206,6 +217,7 @@ export interface RequestDetail {
|
||||
failure_summary?: RequestErrorDomain | null
|
||||
errors?: RequestErrorDomains | null
|
||||
error_flow?: RequestErrorFlow | null
|
||||
scheduling_failure?: RequestSchedulingFailure | null
|
||||
response_time_ms: number
|
||||
first_byte_time_ms?: number | null
|
||||
created_at: string
|
||||
@@ -366,7 +378,7 @@ export interface TimeRangeParams {
|
||||
export const dashboardApi = {
|
||||
// 获取仪表盘统计数据
|
||||
async getStats(params?: TimeRangeParams): Promise<DashboardStatsResponse> {
|
||||
const cacheKey = buildCacheKey('dashboard:stats', params)
|
||||
const cacheKey = buildCacheKey('dashboard:stats', params as Record<string, unknown> | undefined)
|
||||
return cachedRequest(
|
||||
cacheKey,
|
||||
async () => {
|
||||
@@ -427,7 +439,7 @@ export const dashboardApi = {
|
||||
|
||||
// 获取每日统计数据
|
||||
async getDailyStats(params?: TimeRangeParams & { days?: number }): Promise<DailyStatsResponse> {
|
||||
const cacheKey = buildCacheKey('dashboard:daily-stats', params)
|
||||
const cacheKey = buildCacheKey('dashboard:daily-stats', params as Record<string, unknown> | undefined)
|
||||
return cachedRequest(
|
||||
cacheKey,
|
||||
async () => {
|
||||
|
||||
Reference in New Issue
Block a user