agent: Improve error reporting from Pinentry.