Whenever you report a (suspected) bug, you should state the behavior you observe and what you expected instead. So in this case, and as you opened a bug report with GnuPG, you should state what you think should happen. If you add it here, you should edit the question, not add it only in a comment. See also the suggestions at the bottom.
Yes, this happens because the window is too small. It also doesn't originate from GnuPG: GnuPG just calls the
pinentry-program you specified in the configuration.
For details about what happens, we can try to call it manually.
$ stty cols 20 rows 10
OK Pleased to meet you
S ERROR curses.dialog_create 83886381
ERR 83886381 Screen or window too small <Pinentry>
Here I first made the tty size small and then called
pinentry-curses. It waits for a command, I typed
GETPIN, the command to acquire the PIN. It complains that the screen is too small to display the dialog. GnuPG just reports that it can't get the PIN.
I saw what you wrote it the ticket, but what you propose is between difficult and impossibly, because
gpg should not care about terminal size, and therefor should not claim that the terminal is too small.
Instead I would suggest the following text (I don't want to create an account there):
gpg calls the
pinentry-program if it needs to decrypt a key. It would be better for the user if
pgp wouldn't display the generic message
decryption failed: No secret key
and instead forwarded the message from the
pinentry-program, something like:
Can't decrypt key, pinentry-program failed with (text from ERR response).
pinentry-curses is maintained by the gpg team, it could detect a small windows and behave the same as when
$TERM is unset, avoiding this error.