Switch on error propagation

Signed-off-by: Fawad Khaliq <mfawadkhaliq@gmail.com>