Open imtrobin opened 5 years ago
@imtrobin
There is no db connection check on CreateWithSetting
. You wont know if your connection settings are valid until the first request is sent. you can call db.CurrentDatabaseInformation()
to make a small request to check for connection validity.
ArangoServerException
will only be raised for database server errors, not the client. the reason for this was to separate server and client errors. you can take a look at ArangoDB Error Codes. unfortunately you can't catch a specific Exception class that corresponds to client errors
Thanks for the quick reply.
Even though it is a httpclient call internally on client, I would think its better to have a ArrangoException class that we can trap properly. ArangoServerException can subclass fromt that
Hi, I'm trying out arangodbclient on a new sample.
After I call CreateWithSetting, how do I check that the db connection is valid? I don't see a valid connection or check.
CreateDatabase will throw but it is throwing System.Exception. I would expect ArangoServerException so I can catch it and deal appropriately. I see WaitSynchronizer does not do that, why not throw as ArangoServerException?