Return an error response
(self, code: int, msg: str)
| 176 | ) |
| 177 | |
| 178 | def fail(self, code: int, msg: str) -> quart.Response: |
| 179 | """Return an error response""" |
| 180 | |
| 181 | return quart.jsonify( |
| 182 | { |
| 183 | 'code': code, |
| 184 | 'msg': msg, |
| 185 | } |
| 186 | ) |
| 187 | |
| 188 | def http_status(self, status: int, code: int, msg: str) -> typing.Tuple[quart.Response, int]: |
| 189 | """返回一个指定状态码的响应""" |
no outgoing calls