put request error check added