Let $$\mathcal{L} = i \hbar c \overline{\psi} \gamma^{\mu} \partial_{\mu} \psi - mc^2 \overline{\psi} \psi $$ be the Lagrangian density for a free Dirac field. I'm studying particle physics from the book of Griffiths (section 11.3. local gauge invariance).
I want to apply the gauge transformation $$\psi \rightarrow e^{-iq \lambda(x) / \hbar c} \psi. $$ This won't leave the Lagrangian invariant since we pick up an extra term, because $$ \partial_{\mu} \psi \rightarrow e^{-iq \lambda(x) / \hbar c} \bigg[ \partial_{\mu} - \frac{iq}{\hbar c} (\partial_{\mu} \lambda) \bigg] \psi. $$
Now Griffiths says that if we replace in the Dirac Lagrangian every derivative $\partial_{\mu}$ with the covariant derivative $$ D_{\mu} = \partial_{\mu} + \frac{iq}{\hbar c} A_{\mu}$$ the transformation $$A_{\mu} \rightarrow A_{\mu} + \partial_{\mu} \lambda $$ will cancel the offending term and leave the Lagrangian invariant. Now I wanted to check if this really works, but in my final calculations I always end up with an extra term. I have $$ \mathcal{L}^{'} = i \hbar c e^{iq \lambda / \hbar c} \overline{\psi} \gamma^{\mu} (\partial_{\mu} + \frac{iq}{\hbar c} A_{\mu}) \big( e^{-iq\lambda / \hbar c} \psi \big) - mc^2 \overline{\psi} \psi. $$ Now I also replace $A_{\mu}$ by $A_{\mu} + \partial_{\mu} \lambda$ . Then I get $$\mathcal{L}^{'} = i \hbar c e^{iq \lambda / \hbar c} \overline{\psi} \gamma^{\mu} \partial_{\mu} \bigg( e^{-iq\lambda / \hbar c} \psi \bigg) - q e^{iq \lambda / \hbar c} \overline{\psi} \gamma^{\mu} \big( A_{\mu} + \partial_{\mu} \lambda \big) \big( e^{-iq\lambda / \hbar c} \psi \big) - mc^2 \psi \overline{\psi}. $$ But if I work this out, I end up with $$\mathcal{L}^{'} = i \hbar c \overline{\psi} \gamma^{\mu} (\partial_{\mu} \psi) - mc^2 \overline{\psi} \psi - q \overline{\psi} \gamma^{\mu} A_{\mu} \psi. $$ Notice the extra term that shows up. Did I do something wrong here? Would appreciate some help because I want to understand this.