MCPcopy Create free account
hub / github.com/krau/SaveAny-Bot / WriteError

Function WriteError

api/types.go:116–121  ·  view source on GitHub ↗

WriteError 写入错误响应

(w http.ResponseWriter, statusCode int, errCode, message string)

Source from the content-addressed store, hash-verified

114
115// WriteError 写入错误响应
116func WriteError(w http.ResponseWriter, statusCode int, errCode, message string) error {
117 return WriteJSON(w, statusCode, ErrorResponse{
118 Error: errCode,
119 Message: message,
120 })
121}
122
123// Task 参数结构体
124

Callers 10

recoveryMiddlewareFunction · 0.85
AuthMiddlewareFunction · 0.85
CreateTaskHandlerMethod · 0.85
ListTasksHandlerMethod · 0.85
GetTaskHandlerMethod · 0.85
CancelTaskHandlerMethod · 0.85
ListStoragesHandlerMethod · 0.85
GetTaskTypesHandlerMethod · 0.85
NotFoundHandlerFunction · 0.85
MethodNotAllowedHandlerFunction · 0.85

Calls 1

WriteJSONFunction · 0.85

Tested by

no test coverage detected