It won't work with raw residuals for several reasons, but arguably can work - at least for some cases - with other choices. E.g pearson residuals can take care of the heteroskedasticity issue.
Other choices can reflect other aspects as well E.g. gamma regression often seems to work fairly well with anscombe residuals or deviance residuals. For discrete data you may need to either round to integers or go to a quasi-glm.
There's also the possibility of simple row-resampling, though I would only consider it with a lot of data.
Then there's parametric bootstrapping.
Check out the book by Davison and Hinkley for examples of bootstrapping glms
There isn't really an error distribution in a glm in the sense of the thing a residual approximates - only the Gaussian has additive constant variance error, arguably the gamma has a multiplicative error, but most glms the residuals change shape as well as variance as the mean changes. I'd strongly advise not trying to conceive of glms in terms of error in general, but instead in terms of conditional distributions.