Using the same logic of the layer upload we now return a generic 500 for any error. 
For the 2.1 we should unify layer upload and layer replace and better handle errors.