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

Errors show up as timeouts #21

Open
aquach opened this issue Aug 22, 2016 · 0 comments
Open

Errors show up as timeouts #21

aquach opened this issue Aug 22, 2016 · 0 comments

Comments

@aquach
Copy link

aquach commented Aug 22, 2016

Because this project uses JSONP to receive HTTP responses, it can't receive any responses sent with HTTP 400/500 because the browser won't try to load them as actual scripts. To reproduce this, try converting a client ID that isn't a part of an experiment: you'll get a request timed out error because the callback is never executed, which is because the browser is not evaluating the response body that would look like sixpack.callback1({ "status": "failed", "message": "not in experiment" }) or something similar.

One way to fix this is to not use HTTP status codes and always return 200. Another solution is to avoid JSONP and use CORS and standard HTTP requests.

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