-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
bugSomething isn't working correctlySomething isn't working correctlygood first issueGood for newcomersGood for newcomersooni/apiIssues related to https://github.com/ooni/apiIssues related to https://github.com/ooni/apipriority/lowNice to haveNice to have
Description
Currently we strip the leading AS
from 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:
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)
We should rather be stripping the leading as
in a case-insensitive way or tighten the rule for matching to avoid triggering an exception.
Metadata
Metadata
Assignees
Labels
bugSomething isn't working correctlySomething isn't working correctlygood first issueGood for newcomersGood for newcomersooni/apiIssues related to https://github.com/ooni/apiIssues related to https://github.com/ooni/apipriority/lowNice to haveNice to have