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

Handle request errors and timeouts gracefully #48

Closed
rolodato opened this issue Sep 19, 2014 · 4 comments
Closed

Handle request errors and timeouts gracefully #48

rolodato opened this issue Sep 19, 2014 · 4 comments

Comments

@rolodato
Copy link
Contributor

When any of these requests fail or time out, Lock will never finish loading and no error message is shown:

This situation should be handled and appropriate error messages should be shown.

@pose
Copy link
Contributor

pose commented Sep 19, 2014

Aren't this issues from Auth0.js? I think that as they are JSONP requests it's going to be hard, or even impossible, to handle them properly. What we can do is add a timeout, but we will need to think a bit about it.

@jfromaniello
Copy link
Member

The first url shown yes is from auth0.js, the second one is a request made by the widget itself.

+1 timeout

@cristiandouce
Copy link
Contributor

Ok, the /ssodata/ request never returns error. It fallbacks to an empty response and also has a timeout of 3 seconds.

You can check it here: https://github.com/auth0/auth0.js/blob/master/lib/index.js#L1014-L1017

Here is an example:

image

The JSONP mock for the client configuration retrieved from S3, is fixed in a commit I'm about to push.

This should fix all issues related to network.

There is no timeout for the S3 request. Should we add one? /cc @jfromaniello @woloski @pose

@cristiandouce
Copy link
Contributor

I added a timeout of 3 seconds to handle the error on fetching S3 data for clients.

billbonney pushed a commit to billbonney/lock that referenced this issue Jun 4, 2016
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

4 participants