Additional error conditions. Fixes DOC-1063

@shnayder please review
@catong , @mhoeber , @srpearce , I’d like to publish this as soon as
Victor gives the ok.
Merge pull request #202 from edx/ahodges/errors

Additional error conditions. Fixes DOC-1063