Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid URLs on auth flow returns a stacktrace #13

Open
jamietanna opened this issue Mar 18, 2020 · 0 comments
Open

Invalid URLs on auth flow returns a stacktrace #13

jamietanna opened this issue Mar 18, 2020 · 0 comments

Comments

@jamietanna
Copy link

If using i.e. https://indiepaper.io/indieauth/?me=jvt.me, we get the following response back

HTTP/2 500 
content-type: application/json
content-length: 2522
date: Wed, 18 Mar 2020 20:43:28 GMT
x-amzn-requestid: 7714f99a-cbfd-40fd-95cc-7c66938d1e96
x-amz-apigw-id: JmotqG_yIAMFRDQ=
x-amzn-trace-id: Root=1-5e7287f0-f510fdc0bc98d77480797090;Sampled=0
x-cache: Error from cloudfront
via: 1.1 3059f113464f0880a3b72a834c64f65f.cloudfront.net (CloudFront)
x-amz-cf-pop: MAN50-C3
x-amz-cf-id: MFwQar4YnAr7X1ZUMSsHiL7M8L4oOiql8GlNoOB0nwKacvtakI73fQ==

"{'message': 'An uncaught exception happened while servicing this request. You can investigate this with the `zappa tail` command.', 'traceback': ['Traceback (most recent call last):\\n', '  File \"/var/task/handler.py\", line 505, in handler\\n    response = Response.from_app(self.wsgi_app, environ)\\n', '  File \"/var/task/werkzeug/wrappers.py\", line 939, in from_app\\n    return cls(*_run_wsgi_app(app, environ, buffered))\\n', '  File \"/var/task/werkzeug/test.py\", line 923, in run_wsgi_app\\n    app_rv = app(environ, start_response)\\n', '  File \"/var/task/zappa/middleware.py\", line 70, in __call__\\n    response = self.application(environ, encode_response)\\n', '  File \"/var/task/beaker/middleware.py\", line 156, in __call__\\n    return self.wrap_app(environ, session_start_response)\\n', '  File \"/var/task/pecan/middleware/recursive.py\", line 56, in __call__\\n    return self.application(environ, start_response)\\n', '  File \"/var/task/pecan/core.py\", line 840, in __call__\\n    return super(Pecan, self).__call__(environ, start_response)\\n', '  File \"/var/task/pecan/core.py\", line 683, in __call__\\n    self.invoke_controller(controller, args, kwargs, state)\\n', '  File \"/var/task/pecan/core.py\", line 574, in invoke_controller\\n    result = controller(*args, **kwargs)\\n', '  File \"/var/task/indiepaper/controllers/indieauth.py\", line 26, in index\\n    indieauth.request_authorization(me, session[\\'state\\'])\\n', '  File \"/var/task/indiepaper/indieauth.py\", line 34, in request_authorization\\n    endpoints = discover_endpoints(me)\\n', '  File \"/var/task/indiepaper/indieauth.py\", line 10, in discover_endpoints\\n    response = requests.get(me)\\n', '  File \"/var/task/requests/api.py\", line 72, in get\\n    return request(\\'get\\', url, params=params, **kwargs)\\n', '  File \"/var/task/requests/api.py\", line 58, in request\\n    return session.request(method=method, url=url, **kwargs)\\n', '  File \"/var/task/requests/sessions.py\", line 498, in request\\n    prep = self.prepare_request(req)\\n', '  File \"/var/task/requests/sessions.py\", line 441, in prepare_request\\n    hooks=merge_hooks(request.hooks, self.hooks),\\n', '  File \"/var/task/requests/models.py\", line 309, in prepare\\n    self.prepare_url(url, params)\\n', '  File \"/var/task/requests/models.py\", line 383, in prepare_url\\n    raise MissingSchema(error)\\n', \"requests.exceptions.MissingSchema: Invalid URL 'jvt.me': No schema supplied. Perhaps you meant http://jvt.me?\\n\"]}"

Ideally the response would be slightly friendlier, maybe returning Invalid URL 'jvt.me': No schema supplied. Perhaps you meant http://jvt.me??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant