A collection of error messages returned by NCBI Entrez
In this section I'll be trying to answer to the questions I expect people might have.
I'm a long time user of the NCBI Entrez web service. It's a great service, but occasionally it fails.
Because the HTTP responses are usually streamed and go via a reverse proxy,
this means that when things fail on the NCBI side, the HTTP response header still says 220 OK
while the transmitted data is breaking off mid-stream.
The proxy servers usually insert an error message, so the obvious thing to do on the client side is to check for the presence of such a message. That would all be fine if the error message was consistent, but unfortunately it isn't. So here is a collection of all the different error messages I have seen from the NCBI Entrez API.
Often the actual sent error message from NCBI contains '+'
characters instead of whitespace.
Hence, both '+'
and whitespace should be removed.
A check could be done similar to the following Python code:
if reference_message.replace(" ", "") in message_from_ncbi.replace("+", "").replace(" ", ""):
pass # Do some error handling
Yes, but I'm not aware of any NCBI documentation listing the possible error messages.
Please feel free to open an issue or submit a pull request to add the new message.
I've added the Apache License to have a license on the repository. For all I care, this license only applies to the README and FAQ. The error_messages.txt file is a plain data collection that I make available under a public domain dedication where available, or under a CC0 license otherwise.