Fix http error message by using the correct body variable

Also remove the unused @queue variable and make sure the body variable
in the post method is not shadowed.