- Algolia Client Version: 3.26.1
Description
Currently the function index.Exists doesn't accept options like other functions.
We use opts to pass the current context. With a custom Requester (http.client) it's allow us to do tracing.
Without opts we can trace correctly this Exists function 😞
Is it possible to add opts on Exists function, like this ?
func (i *Index) Exists(opts ...interface{}) (bool, error) {
_, err := i.GetSettings(opts)
if err == nil {
return true, nil
}
if _, ok := errs.IsAlgoliaErrWithCode(err, http.StatusNotFound); ok {
return false, nil
}
return false, err
}
I can create a PR to fix this 👍🏻