MCPcopy Index your code
hub / github.com/beetbox/beets / error

Method error

beetsplug/aura.py:138–150  ·  view source on GitHub ↗

Make a response for an error following the JSON:API spec. Args: status: An HTTP status code string, e.g. "404 Not Found". title: A short, human-readable summary of the problem. detail: A human-readable explanation specific to this occurren

(status, title, detail)

Source from the content-addressed store, hash-verified

136
137 @staticmethod
138 def error(status, title, detail):
139 """Make a response for an error following the JSON:API spec.
140
141 Args:
142 status: An HTTP status code string, e.g. "404 Not Found".
143 title: A short, human-readable summary of the problem.
144 detail: A human-readable explanation specific to this
145 occurrence of the problem.
146 """
147 document = {
148 "errors": [{"status": status, "title": title, "detail": detail}]
149 }
150 return make_response(document, status)
151
152 @classmethod
153 def get_attribute_converter(cls, beets_attr: str) -> type[SQLiteType]:

Callers 15

_search_apiMethod · 0.80
move_artMethod · 0.80
try_writeMethod · 0.80
_saveMethod · 0.80
unarchiveMethod · 0.80
mainFunction · 0.80
write_itemsFunction · 0.80
update_itemsFunction · 0.80
logMethod · 0.80
resizeMethod · 0.80
get_sizeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected