(self, error_code, error="Invalid item", **kwargs)
| 161 | """/api/import endpoint for general data formats.""" |
| 162 | |
| 163 | def error(self, error_code, error="Invalid item", **kwargs): |
| 164 | content = {"success": False, "error_code": error_code, "error": error} |
| 165 | content.update(kwargs) |
| 166 | raise web.HTTPError("400 Bad Request", data=json.dumps(content)) |
| 167 | |
| 168 | def POST(self): |
| 169 | web.header("Content-Type", "application/json") |
no test coverage detected