ping: return json error in /ping/ handler, if it failed