If I opt not to track inventory on a given variant, variant.total_on_hand is Infinity, which cannot be implicitly converted to JSON, resulting in a JSON::GeneratorError exception during serialization.
I'm not sure what the correct outcome is for this use case. I'm open to thoughts.