Add more error codes and message, reflow some doc comments.

This test is wrong. Should be deleted and the error isn't in that function.