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)
| 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]: |
no outgoing calls
no test coverage detected