mirror of
https://github.com/eoao/cloud-mail.git
synced 2026-06-20 02:57:26 +08:00
修改报错提示
This commit is contained in:
@@ -45,6 +45,17 @@ http.interceptors.response.use((res) => {
|
||||
repeatNum: -4,
|
||||
})
|
||||
reject(data)
|
||||
|
||||
} else if (data.code === 502) {
|
||||
ElMessage({
|
||||
dangerouslyUseHTMLString: true,
|
||||
message: data.message,
|
||||
type: 'error',
|
||||
plain: true,
|
||||
grouping: true,
|
||||
repeatNum: -4,
|
||||
})
|
||||
reject(data)
|
||||
} else if (data.code !== 200) {
|
||||
ElMessage({
|
||||
message: data.message,
|
||||
|
||||
@@ -14,15 +14,15 @@ app.onError((err, c) => {
|
||||
}
|
||||
|
||||
if (err.message === `Cannot read properties of undefined (reading 'get')`) {
|
||||
return c.json(result.fail('初始化失败:KV数据库未绑定或变量名错误'));
|
||||
return c.json(result.fail('KV数据库未绑定<br>KV database not bound',502));
|
||||
}
|
||||
|
||||
if (err.message === `Cannot read properties of undefined (reading 'put')`) {
|
||||
return c.json(result.fail('初始化失败:KV数据库未绑定或变量名错误'));
|
||||
return c.json(result.fail('KV数据库未绑定<br>KV database not bound',502));
|
||||
}
|
||||
|
||||
if (err.message === `Cannot read properties of undefined (reading 'prepare')`) {
|
||||
return c.json(result.fail('初始化失败:D1数据库未绑定或变量名错误'));
|
||||
return c.json(result.fail('D1数据库未绑定<br>D1 database not bound',502));
|
||||
}
|
||||
|
||||
return c.json(result.fail(err.message, err.code));
|
||||
|
||||
Reference in New Issue
Block a user