use body rather than payload when sending to client
logging and error cases