Improve error reporting for failed DOI lookups.

Fixes #389.