- def error(self, msg: str) -> HTTPException:
- return HTTPException(400, detail=msg)
+ def error(self, msg: str, status: int = 400) -> HTTPException:
+ return HTTPException(status, detail=msg)
+
+
+ def create_response(self, status: int, output: str) -> Response:
+ return Response(output, status_code=status, media_type=self.content_type)