Error message fix + minor code tweak

We generally format `.then(` at the beginning of the line, as that tends to make the nesting clearer. Certainly a matter of taste, but since we use this style pretty much everywhere it's good to remain consistent.