mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
fix(executor): properly handle thinking application errors
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
// Package thinking provides unified thinking configuration processing logic.
|
||||
package thinking
|
||||
|
||||
import "net/http"
|
||||
|
||||
// ErrorCode represents the type of thinking configuration error.
|
||||
type ErrorCode string
|
||||
|
||||
@@ -69,3 +71,8 @@ func NewThinkingErrorWithModel(code ErrorCode, message, model string) *ThinkingE
|
||||
Model: model,
|
||||
}
|
||||
}
|
||||
|
||||
// StatusCode implements a portable status code interface for HTTP handlers.
|
||||
func (e *ThinkingError) StatusCode() int {
|
||||
return http.StatusBadRequest
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user