+ resp.status = exception.status
+ resp.text = exception.msg
+ resp.content_type = exception.content_type
+
+
+class ParamWrapper(api_impl.ASGIAdaptor):
+ """ Adaptor class for server glue to Falcon framework.
+ """
+
+ def __init__(self, req: Request, resp: Response,
+ config: Configuration) -> None:
+ self.request = req
+ self.response = resp
+ self._config = config
+
+
+ def get(self, name: str, default: Optional[str] = None) -> Optional[str]:
+ return cast(Optional[str], self.request.get_param(name, default=default))
+
+
+ def get_header(self, name: str, default: Optional[str] = None) -> Optional[str]:
+ return cast(Optional[str], self.request.get_header(name, default=default))
+
+
+ def error(self, msg: str, status: int = 400) -> HTTPNominatimError:
+ return HTTPNominatimError(msg, status, self.content_type)
+