What is my mistake in this determinant of order $n$?
As your error was already clarified in other answers here only a hint to solution will be given.
I will assume $a_i\ne0$. Observe that your matrix is in form: $$ \alpha=A+u^Tv, $$ where $$A=\operatorname {diag}(a_1,a_2,\dots,a_n),\quad u=(b_1,b_2,\dots,b_n),\quad v=(1,1,\dots,1). $$ Then by matrix determinant lemma: $$ \det (\alpha)=(1+vA^{-1}u^T)\det (A)=\left(1+\sum_i\frac {b_i }{a_i}\right)\prod_i a_i. $$