added better error handling and response codes to post_result method

Change-Id: I01a498e65c67a4f46939d0d6204338b8130c2515