Fix HTTP POST error handling and correct typos