typesense / typesense-java

Java client for Typesense
https://typesense.org/docs/latest/api/
Apache License 2.0
58 stars 28 forks source link

makeRequest should throw TypesenseError and not silently catch it #14

Closed superkelvint closed 2 years ago

superkelvint commented 2 years ago

Description

ApiCall.makeRequest() should throw TypesenseError instead of silently catching it and printing the stacktrace. At the moment, due to this mechanism, there is no way of distinguishing between a collection which doesn't exist and when a collection exists but the api key is wrong as both return null.

Metadata

Typsense Version: 0.21

OS: Ubuntu 20.04

harisarang commented 2 years ago

@superkelvint Thanks for pointing this out ! Will fix this

kishorenc commented 2 years ago

Latest version propagates exceptions meaningfully to the caller.