  A potential solution to the Hubble tension is the hypothesis that the Milky
Way is located near the center of a matter underdensity. We model this scenario
through the Lema\^itre-Tolman-Bondi formalism with the inclusion of a
cosmological constant ($\Lambda$LTB) and consider a generalized Gaussian
parametrization for the matter density profile. We constrain the underdensity
and the background cosmology with a combination of data sets: the Pantheon
Sample of type Ia supernovae (both the full catalogue and a redshift-binned
version of it), a collection of baryon acoustic oscillations data points and
the distance priors extracted from the latest Planck data release. The analysis
with the binned supernovae suggests a preference for a $-13 \%$ density drop
with a size of approximately 300 Mpc, interestingly matching the prediction for
the so-called KBC void already identified on the basis of independent analyses
using galaxy distributions. The constraints obtained with the full Pantheon
Sample are instead compatible with a homogeneous cosmology and we interpret
this radically different result as a cautionary tale about the potential bias
introduced by employing a binned supernova data set. We quantify the level of
improvement on the Hubble tension by analyzing the constraints on the B-band
absolute magnitude of the supernovae, which provides the calibration for the
local measurements of $H_0$. Since no significant difference is observed with
respect to an analogous fit performed with a standard $\Lambda$CDM cosmology,
we conclude that the potential presence of a local underdensity does not
resolve the tension and does not significantly degrade current supernova
constraints on $H_0$.
