Ensure that the forwardRequest function exits on errors.