Assign `body` before using it

The worker example doesn't run as is.