Handle cases when errno is set, but dbi does not return error message

Signed-off-by: Michal Čihař <michal@cihar.com>