Query returned successfully when obvious error should occur
According to this ticket, the workaround is to set English language for messages in postgresql.conf, e.g.

lc_messages = 'en_GB.UTF-8'


See also this question on SO.