ticket:9 handle DatabaseError exception