It depends on the error you made. Bank systems use a modulus checking system which basically takes the 6 digits of the sortcode and 8 of your account number, runs an equation and if the figure it comes up with = a certain number, then it is deemed a valid account. It's perfectly possible therefore that the wrong account number could be accepted by the banks systems if it passed that check.
If it does turn out to be an invalid number then the funds will normally get credited to a suspense account within the bank. Don't depend on it being bounced back automatically, I suggest you follow up with the bank in writing and ask them to return the funds