Return after logging errors to avoid more failures

Ran into issues trying to return json that didn't exist when I wasn't supplying ENV vars properly, so this helps prevent those kinds of failures.