CONTRIB-4472 Add config to control response code on error