now returns a better error message when publish a doc fails
Merge pull request #263 from LearningRegistry/fix_publish_error_message

now returns a better error message when publish a doc fails