We present the results of the analysis of \gamma -ray and X-ray data of GRBÂ 050401 taken with the Swift satellite , together with a series of ground-based follow-up optical observations . The Swift X-ray light curve shows a clear break at about 4900Â s after the GRB . The decay indices before and after the break are consistent with a scenario of continuous injection of radiation from the ‘ central engine ’ of the GRB to the fireball . Alternatively , this behaviour could result if ejecta are released with a range of Lorentz factors with the slower shells catching up the faster at the afterglow shock position . The two scenarios are observationally indistinguishable . The GRBÂ 050401 afterglow is quite bright in the X-ray band , but weak in the optical , with an optical to X-ray flux ratio similar to those of ‘ dark bursts ’ . We detect a significant amount of absorption in the X-ray spectrum , with N _ { H } = ( 1.7 \pm 0.2 ) \times 10 ^ { 22 } Â cm ^ { -2 } at a redshift of z = 2.9 , which is typical of a dense circumburst medium . Such high column density implies an unrealistic optical extinction of 30 magnitudes if we adopt a Galactic extinction law , which would not be consistent with the optical detection of the afterglow . This suggests that the extinction law is different from the Galactic one .