output error details if post unsuccessfully