You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have non-raising methods on Client, like delete_database or create_database_user. In my project I'm automating this (creating databases and users on the fly) and the management code get's quite noise with all those exception handling. One issue is that there are no specific Exceptions: Both examples raise InfluxDB::Error and you have to match the message in order to figure out what the problem was (I'm happy to provide a PR for that too).
IMO these methods should only return true (or something else) on success and false otherwise. A bang variant could raise on e.g. "not found" errors. They should raise InfluxDB::AuthenticationError though.
@tisba This seems like a reasonable request. Let me take a look at how this would affect the existing interface and we'll see if we can get something in place soon. Thanks!
It would be nice to have non-raising methods on
Client
, likedelete_database
orcreate_database_user
. In my project I'm automating this (creating databases and users on the fly) and the management code get's quite noise with all those exception handling. One issue is that there are no specific Exceptions: Both examples raiseInfluxDB::Error
and you have to match the message in order to figure out what the problem was (I'm happy to provide a PR for that too).Take this real world code e.g.:
IMO these methods should only return
true
(or something else) on success andfalse
otherwise. A bang variant could raise on e.g. "not found" errors. They should raiseInfluxDB::AuthenticationError
though.If accepted, I'm happy to provide a PR.
The text was updated successfully, but these errors were encountered: