attempt to fix error propagation in https