mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-13 01:06:03 +00:00
refactor: standardize error handling across components by utilizing CustomApiError for improved error messaging
This commit is contained in:
@@ -147,7 +147,7 @@ export abstract class BaseHttpClient {
|
||||
// 错误处理
|
||||
protected handleError(error: object): never {
|
||||
if (axios.isCancel(error)) {
|
||||
throw { code: -2, message: 'Request canceled', data: null };
|
||||
throw { code: -2, msg: 'Request canceled', data: null };
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user