Estimating this sum is much the same as estimating the error term in the prime number theorem for arithmetic progressions. See Exercises 7-8 in Section 11.3 of Montgomery-Vaughan: Multiplicative number theory I (Cambridge University Press, 2006). (Your sum is denoted by $M(X,\chi)$ in this book, as introduced by (11.39) there.)