fix regression on healthz error handler, added test to cover