Throw exception if no field is provided when calling toLineProtocol()#150
Throw exception if no field is provided when calling toLineProtocol()#150baptgb wants to merge 2 commits intoinfluxdata:masterfrom
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #150 +/- ##
=========================================
Coverage 74.86% 74.86%
Complexity 424 424
=========================================
Files 25 25
Lines 1094 1094
=========================================
Hits 819 819
Misses 275 275
☔ View full report in Codecov by Sentry. |
powersj
left a comment
There was a problem hiding this comment.
Hi,
Thanks for the issue and taking the time to put up a PR. We would like to maintain the default behavior of not throwing an exception. The change could cause issues for users who upgrade and suddenly start getting exceptions.
Is there a way you could create an option in the client to turn on this new behavior?
Hi, I propose adding the |
Unfortunately, at this late in the life-cycle we do not want introduce this type of change. |
Closes #149
Proposed Changes
toLineProtocol() will throw an exception if no field is provided. This prevents the data from being silently converted to null and discarded, thereby providing the developer with a clear error message, as fields are mandatory.
Checklist
make testcompletes successfully