-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
improving UX when a http exception is encountered #11490
Conversation
This reverts commit 0c612e7.
… for more detailed error messages and debugging
…ed it in FetcherClientException
catching the FetcherException and displaying the errorDialog with HttpResponse Body
docs/code-howtos/tools.md
Outdated
@@ -37,7 +37,7 @@ See also: [https://help.github.com/articles/syncing-a-fork/](https://help.github | |||
(As Administrator - one time) | |||
|
|||
1. Install [chocolatey](https://chocolatey.org) | |||
2. `choco install git.install -y --params "/GitAndUnixToolsOnPath /WindowsTerminal"` | |||
2. `choco install git.install -y --params "/GitAndUnixToolsOnPath /WindowsTerminal` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure about that? That does not seem right...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sorry i am not aware when i changed the file , must have been a mistake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to be sorry, mistakes happen and we learn. as a general rule, always check your changes before committing them. its easy if you use "git gui" to commit instead of the command line or the integrates tools in the ide.
src/main/java/org/jabref/gui/importer/fetcher/WebSearchPaneViewModel.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/gui/importer/fetcher/WebSearchPaneViewModel.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/importer/SearchBasedParserFetcher.java
Outdated
Show resolved
Hide resolved
just some quick notes after skimming your changes. thank you for your interest in jabref! |
src/main/java/org/jabref/logic/importer/SearchBasedParserFetcher.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good initial version. I see some improvement points.
The main point is that the handling also needs to be added to org.jabref.logic.importer.EntryBasedParserFetcher#performSearch
.
src/main/java/org/jabref/gui/importer/fetcher/WebSearchPaneViewModel.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/gui/importer/fetcher/WebSearchPaneViewModel.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/importer/SearchBasedParserFetcher.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/logic/importer/SearchBasedParserFetcher.java
Outdated
Show resolved
Hide resolved
1. updated API_KEY_PATTERN a. now it matches with "key also" b. it only hides the api_key and does not remove everything after it 2. moved "[REDACTED]" string to a class constant REDACTED_STRING
How can i reproduce the error at EntryBasedParserFetcher ? also i think we should check and remove the api_keys from |
Can you try to work on it, too? Maybe wrap it in Fetcher exception? (Need to check the source for myself. Where is URL Download used etc. Maybe, one could introduce FetcherIoException subclassing IOexception and having the http response contained. Thus, one can add another catch where appropriate) |
Yes of course I will work on it and push the changes |
I am not sure how to proceed further in this issue. The source of error seems Some guidance will be really helpful. Also i would like to inform the way i am producing these errors is going to File-->preferences-->WebSearch and choosing Custom API keys for fetchers (i leave the value blank) can this approach be causing some issues? |
I really need to think deeper of this. Currently, I think: Can this IOException be catched early and transformed to |
Closes #11223
I am aware the dialog box content and the way i am caching error needs improvement and I am seeking feedback on that or any changes that do not meet the quality of JabRef.
Can you please describe what should be the content of the (title and body) of the dialog box with this new approach of using SimpleHttpResponse object. and if the stack trace should be included in the dialog box as well
I am not sure how we can include (or we should not)both the http response and the redacted URL in the dialog box. Because they come from two different exceptions (parent and grandparent exceptions).
updated screenshot
Thank you so much for all your time and guidance
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)