MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / homeModelsErrorType

Function homeModelsErrorType

internal/api/server.go:1297–1313  ·  view source on GitHub ↗
(raw []byte)

Source from the content-addressed store, hash-verified

1295}
1296
1297func homeModelsErrorType(raw []byte) string {
1298 top, ok := unmarshalHomeModelsTopLevel(raw)
1299 if !ok {
1300 return ""
1301 }
1302 rawErr, exists := top["error"]
1303 if !exists {
1304 return ""
1305 }
1306 var errObj struct {
1307 Type string `json:"type"`
1308 }
1309 if errUnmarshal := json.Unmarshal(rawErr, &errObj); errUnmarshal != nil {
1310 return ""
1311 }
1312 return strings.TrimSpace(errObj.Type)
1313}
1314
1315func homeModelsErrorMessage(raw []byte) string {
1316 top, ok := unmarshalHomeModelsTopLevel(raw)

Callers 1

homeModelsAuthStatusFunction · 0.85

Calls 1

Tested by

no test coverage detected