ropensci / rentrez

talk with NCBI entrez using R
https://docs.ropensci.org/rentrez
Other
194 stars 38 forks source link

Suggest: full URL in error message #159

Open richelbilderbeek opened 3 years ago

richelbilderbeek commented 3 years ago

Dear rentrez maintainer,

With the Issue I try to seduce you to show the full URL (i.e. API call) in the error message. This would be useful when the NCBI API is down (which it is since yesterday/today [edit: the API is up again now]), so one can submit a bug report to them.

An example, is the example code in the README:

rentrez::entrez_search(db="pubmed", term="10.1038/nature08789[doi]")

One now gets:

Error: HTTP failure: 500
{"error":"error forwarding request","api-key":"94.212.44.250","type":"ip",
"status":"ok"}

I suggest to also add the URL/API call, such as:

Error: HTTP failure: 500
{"error":"error forwarding request","api-key":"94.212.44.250","type":"ip",
"status":"ok"} for URL https://ncbi/whatever&something=23

Would be awesome!

Cheers, Richel Bilderbeek

dwinter commented 3 years ago

Thanks @richelbilderbeek

Good idea, and I think it should be do-able. Just a note, this is my last work-week for 2020 and I'll be taking a proper break over the summer. So I probably wont' get to these issues until next year.