Skip to content

IsUpAsync throws uncaught CouchException instead of returning success value #107

Closed
@PulFur

Description

@PulFur

Expected:
CouchClient's IsUpAsync method returns false if connection can't be made / service is not up

Actual:
Uncaught CouchException is thrown

Tried to check whether valid CouchClient connection is up and running by using IsUpAsync method, but received uncaught CouchException instead when invalid IP/port was specified. I would expect it to return false when connection can't be established.

I did check from source code that RequestsHelper's SendRequestAsync method throws CouchNotFoundException only if HTTP 404 status is returned. However. If service is not up it might return other status codes or not respond at all.

In IsUpAsync method it's only catching CouchNotFoundException exception which may be too specific. Should it catch CouchException instead to cover up these other cases, or is there something else that could be done?

As a workaround I am currently catching this exception my self.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions