统一错误处理
This commit is contained in:
@@ -56,6 +56,8 @@ function mapCommonCodeToKey(code: string): WelcomeErrorKey {
|
||||
return "errors.externalCommandFailed"
|
||||
case "window_operation_failed":
|
||||
return "errors.windowOperationFailed"
|
||||
case "task_execution_failed":
|
||||
return "errors.unknown"
|
||||
default:
|
||||
return "errors.unknown"
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ export type AppErrorCode =
|
||||
| "io_error"
|
||||
| "external_command_failed"
|
||||
| "window_operation_failed"
|
||||
| "task_execution_failed"
|
||||
| (string & {})
|
||||
|
||||
export interface AppCommandError {
|
||||
|
||||
Reference in New Issue
Block a user