Fix broken metrics caused by rashly removing json response (and add a test)