Open romanesko opened 8 years ago
I just added db error codes to pgmoon
but they aren't exposed in lapis right now. The way lapis handles db error is by calling error
which isn't flexible for cases where you might expect an error (eg. handling a unique key insertion failure).
I need to come up with an interface for accessing the error codes that doesn't break existing API and has no serious performance implications.
If i throw error in postgres stored procedure like
raise exception 'something' using errcode='OF001';
— i get only the messageCan I get db error code?