feat:移除了弹窗,服务器添加sls
This commit is contained in:
11
apps/telemetry-dashboard/server/utils/admin-http-error.ts
Normal file
11
apps/telemetry-dashboard/server/utils/admin-http-error.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { createError } from 'h3'
|
||||
|
||||
import type { AdminApiError } from './errors'
|
||||
|
||||
export function toAdminHttpError(error: AdminApiError) {
|
||||
return createError({
|
||||
statusCode: error.statusCode,
|
||||
statusMessage: error.message,
|
||||
data: { error: { code: error.code, message: error.message } },
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user