]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/server/sanic/server.py
Merge pull request #3030 from lonvia/interpolation-corner-cases
[nominatim.git] / nominatim / server / sanic / server.py
index 0bc7a1e7317d6daf17b8084f6880e302439468a2..15887eefd71b04d2d519f77352a54b5758ab2d05 100644 (file)
@@ -35,12 +35,13 @@ class ParamWrapper(api_impl.ASGIAdaptor):
 
 
     def error(self, msg: str, status: int = 400) -> SanicException:
-        return SanicException(msg, status_code=status)
+        exception = SanicException(msg, status_code=status)
 
+        return exception
 
-    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: