]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/server/sanic/server.py
api: generalize error handling
[nominatim.git] / nominatim / server / sanic / server.py
index 0bc7a1e7317d6daf17b8084f6880e302439468a2..a2379501d9a9ca6ed37679b02907eb1067fbc04c 100644 (file)
@@ -38,9 +38,8 @@ class ParamWrapper(api_impl.ASGIAdaptor):
         return SanicException(msg, status_code=status)
 
 
         return SanicException(msg, status_code=status)
 
 
-    def create_response(self, status: int, output: str,
-                        content_type: str) -> HTTPResponse:
-        return TextResponse(output, status=status, content_type=content_type)
+    def create_response(self, status: int, output: str) -> HTTPResponse:
+        return TextResponse(output, status=status, content_type=self.content_type)
 
 
     def config(self) -> Configuration:
 
 
     def config(self) -> Configuration: