bblfsh / web

Web client for Babelfish server
http://dashboard.bblf.sh
GNU General Public License v3.0
23 stars 21 forks source link

Timeout errors are not visible to the user #187

Closed dennwc closed 5 years ago

dennwc commented 5 years ago

Steps to reproduce:

1) Go to http://play.bblf.sh 2) Change language to "JavaScript" 3) Paste a large file (example) 4) Click "Parse"

What happens

Nothing. there is still an old UAST in the right panel and no indication of failed parse request.

What is expected

Looking at the console, there is clearly a timeout for parse request. It should be displayed to the user with a suggestion to try a smaller file.

smacker commented 5 years ago

it was partly fixed on master. Now it shows "internal error":

Screenshot 2019-03-12 at 12 53 43
dpordomingo commented 5 years ago

@smacker I think we should try to show that it was a timeout error, shouldn't we? And even better if the dashboard can also say in which part of the communication did it happened

smacker commented 5 years ago

that's why I said "partially".

smacker commented 5 years ago

Current bblfshd and client-go don't have default timeouts anymore. We don't add any timeout too. So this bug isn't reproducable locally anymore.

In a hosted enviroment proxy can timeout and this error is displayed correctly (I saw it but I can't reproduce it anymore for a screenshot, bblfshd became too fast).

So here is nothing to fix.

But I added correct handling of request cancelation & correct http error in case bblfsh will add some timeout in the future.