mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-01 08:28:34 +00:00
fix(ops): surface backend reason when system log cleanup is rejected
This commit is contained in:
@@ -6,6 +6,7 @@ import { opsAPI, type OpsRuntimeLogConfig, type OpsSystemLog, type OpsSystemLogS
|
||||
import Pagination from '@/components/common/Pagination.vue'
|
||||
import Select from '@/components/common/Select.vue'
|
||||
import { useAppStore } from '@/stores'
|
||||
import { extractApiErrorMessage } from '@/utils/apiError'
|
||||
|
||||
const appStore = useAppStore()
|
||||
const { t } = useI18n()
|
||||
@@ -312,7 +313,11 @@ const cleanupCurrentFilter = async () => {
|
||||
await Promise.all([fetchLogs(), fetchHealth()])
|
||||
} catch (err: any) {
|
||||
console.error('[OpsSystemLogTable] Failed to cleanup logs', err)
|
||||
appStore.showError(err?.response?.data?.detail || t('admin.ops.systemLogs.cleanupFailed'))
|
||||
appStore.showError(
|
||||
extractApiErrorMessage(err, t('admin.ops.systemLogs.cleanupFailed'), {
|
||||
OPS_SYSTEM_LOG_CLEANUP_FILTER_REQUIRED: t('admin.ops.systemLogs.cleanupFilterRequired')
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user