use mDelivery.postError instead of request.deliverError
clean up code