More fruitful error handling
Moved posting to a helper function.