File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1838, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1824, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python3.7/site-packages/connexion/decorators/decorator.py", line 73, in wrapper response = function(request) File "/usr/local/lib/python3.7/site-packages/connexion/decorators/uri_parsing.py", line 117, in wrapper response = function(request) File "/usr/local/lib/python3.7/site-packages/connexion/decorators/validation.py", line 336, in wrapper return function(request) File "/usr/local/lib/python3.7/site-packages/connexion/decorators/decorator.py", line 44, in wrapper response = function(request) File "/usr/local/lib/python3.7/site-packages/connexion/decorators/parameter.py", line 207, in wrapper return function(**kwargs) File "/app/measurements/api/measurements.py", line 357, in list_measurements probe_asn = int(probe_asn)
Currently we strip the leading
ASfrom the probe_asn field, but only if it's uppercase, see: https://github.com/ooni/api/blob/9349825b05b8006a476e8dbaf37e1d9aabf4fc69/measurements/api/measurements.py#L63.In sentry we found the following stacktrace exception:
We should rather be stripping the leading
asin a case-insensitive way or tighten the rule for matching to avoid triggering an exception.