-
-
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
Improve error message when downloading a file fails #9826
Comments
Hi Team,
|
As a general advice for newcomers: check out Contributing for a start. Also, guidelines for setting up a local workspace is worth having a look at. Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's Gitter chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback. |
Your approach goes in the right direction. However, as I outlined in the issue, you first need to check the type of the exception if it's a FetcherClientException or a FetcherServerException I would also add a new field to the FetcherClientException and Server: The status code, so you don't need to check the message but can check the field. I would check for at least 403 and 404 and maybe as well 401 Second: I already noticed that you don't need to do anything with storing of the url as it is already contained in the file field. |
The issue to improve the error message remains. The pull-request seemed promising. |
Can I work on this? |
I'm having trouble reproducing this error, I tried to paste what @Siedlerchr provided, and no error occurred. |
Copy the following bibtex code:
Paste it on the maintable in a new library
See the error message: 403 forbidden
Context:
It's a known issue that sometimes the browser extension shows an error page although the import was successful (and there is an issue already for this).
However, the error dialog on the JabRef side needs improvement: explain what 403 means and suggest solutions (not everyone knows this), and also report the url it tried to download; finally, it should proceed with the import and save the file url just as an linked url in the file field.
Solution:
jabref/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java
Lines 475 to 478 in e34cd37
Include the URL in the error message
For a reference/similar handling, see:
jabref/src/main/java/org/jabref/gui/EntryTypeViewModel.java
Lines 154 to 162 in e34cd37
Originally posted by @tobiasdiez in #9816 (comment)
The text was updated successfully, but these errors were encountered: