[#40463877] Error handling based on database error codes