-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Steps to reproduce:
- set eg. lc_messages = 'Polish_Poland.1250' in postgresql.conf
- do a tx.querySet with SQL query that generates error on PostgreSQL server side (I tested with foreign key violation)
- resulting Observable does not emit any error and even tx.commit works fine
After changing lc_messages to lc_messages = 'en_US.UTF-8', Observable emits error just fine. I'm attaching a Wireshark dump with exchange, that was not parsed as an error message (while it should be, see packet 6 - there is an information about error):
pl_no_errors.zip.
Actually, while debugging through library code, I found something that maps error level from answer to some kind of enum. While this can work for English locale, it doesn't for all others: java.lang.IllegalArgumentException: No enum constant com.github.pgasync.impl.message.ErrorResponse.Level.BŁĄD
From what I see, there's no easy way to get non-localized error level for postgres (maybe by mapping SQLCODES), but could your library be changed to at least not swallow the exception?