better error propagation from document server