Add exception throwing on ERROR message from postgres