Closed fritzfranzke closed 1 year ago
A document ID that doesn't exist should cause the DB to return a 404
and the SDK should throw com.ibm.cloud.sdk.core.service.exception.NotFoundException
. This works fine for me with 0.4.2
.
Probably worth noting that NotFoundException
is a RuntimeException
. If you copied the README example then there is an explicit catch block for it.
Indeed, wrapping in a try-catch
works as you described.
Thanks for the quick support and sorry for not reading the docs more thoroughly :/
Describe the bug I am querying the database for documents using the example from the README. This works fine as long a document with the specified ID exists. However, if no document exists, the call never completes.
To Reproduce Add a document with ID
X
to the databasetest
. Execute the following code:This should return the document. Calling the same code with
docId
set toY
doesn't return anything, but also never finishes, making error handling impossible.Must gather (please complete the following information):
0.4.2
17.0.6 (2023-01-17)
Additional context I am using the SDK with Apache CouchDB. Am misunderstanding the API, or are there some flags I need to set for this to work? Thanks for the great work!