handle promise error propagation