MCPcopy
hub / github.com/sansan0/TrendRadar / to_dict

Method to_dict

mcp_server/utils/errors.py:37–45  ·  view source on GitHub ↗

转换为字典格式

(self)

Source from the content-addressed store, hash-verified

35 self.suggestion = suggestion
36
37 def to_dict(self) -> dict:
38 """转换为字典格式"""
39 error_dict = {
40 "code": self.code,
41 "message": self.message
42 }
43 if self.suggestion:
44 error_dict["suggestion"] = self.suggestion
45 return error_dict
46
47
48class DataNotFoundError(MCPError):

Callers 15

resolve_date_rangeFunction · 0.45
compare_platformsMethod · 0.45
analyze_sentimentMethod · 0.45
find_similar_newsMethod · 0.45
search_by_entityMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected