Connect to db first. Propagate error messages.