You've already forked agentic-coding-workflow
启动项目逻辑
This commit is contained in:
@@ -99,6 +99,15 @@ const (
|
||||
CodeMcpTokenNameRequired Code = "mcp.token_name_required"
|
||||
CodeMcpTokenExpiresRequired Code = "mcp.token_expires_required"
|
||||
CodeMcpRateLimited Code = "mcp.rate_limited"
|
||||
|
||||
// Run 域(workspace run profiles)
|
||||
CodeRunProfileNotFound Code = "run.profile_not_found"
|
||||
CodeRunProfileSlugTaken Code = "run.profile_slug_taken"
|
||||
CodeRunProfileAlreadyRunning Code = "run.profile_already_running"
|
||||
CodeRunProfileNotRunning Code = "run.profile_not_running"
|
||||
CodeRunProfileDisabled Code = "run.profile_disabled"
|
||||
CodeRunSpawnFailed Code = "run.spawn_failed"
|
||||
CodeRunCommandInvalid Code = "run.command_invalid"
|
||||
)
|
||||
|
||||
// AppError is the application's structured error type. It carries a stable
|
||||
@@ -239,6 +248,15 @@ func HTTPStatus(code Code) int {
|
||||
return http.StatusBadRequest
|
||||
case CodeMcpRateLimited:
|
||||
return http.StatusTooManyRequests
|
||||
case CodeRunProfileNotFound:
|
||||
return http.StatusNotFound
|
||||
case CodeRunProfileSlugTaken, CodeRunProfileAlreadyRunning,
|
||||
CodeRunProfileNotRunning, CodeRunProfileDisabled:
|
||||
return http.StatusConflict
|
||||
case CodeRunCommandInvalid:
|
||||
return http.StatusBadRequest
|
||||
case CodeRunSpawnFailed:
|
||||
return http.StatusBadGateway
|
||||
default:
|
||||
return http.StatusInternalServerError
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user