Return error when body is empty

Fixes unhandled exception when body is null