Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrMissingObjectID = errors.New("objectID is missing or empty") ErrMissingKeyID = errors.New("key ID is not set in Key.Value") ErrNoMoreHostToTry = errors.New("all hosts have been contacted unsuccessfully, it can either be a network error or wrong appID/key credentials were used") ErrIndexAlreadyExists = errors.New("destination index already exists, please delete it first as the CopyIndex cannot hold the responsibility of modifying the destination index") ErrSameAppID = errors.New("indices cannot target the same application ID, please use Client.CopyIndex for same-app index copy instead") ErrObjectNotFound = errors.New("object not found in with search responses' hits list") )
Functions ¶
func ErrJSONDecode ¶
func IsAlgoliaErrWithCode ¶
IsAlgoliaErrWithCode returns the error message along with true if the given error is an AlgoliaErr and its status code matches the given HTTP code. In any other case, an empty string and false are returned.
Types ¶
type AlgoliaErr ¶
AlgoliaErr represents error responses coming from the Algolia Search API when an HTTP call has been sent but the request could not have been processed by the engine.
This error provides more details regarding potential issues with payloads being sent to the API or limits and quotas being reached.
func IsAlgoliaErr ¶
func IsAlgoliaErr(err error) (*AlgoliaErr, bool)
IsAlgoliaErr type-checks the given error against an AlgoliaErr. If the error can be converted, the inner AlgoliaErr is returned along with true. Otherwise, the returned boolean is false and nil is returned.
func (AlgoliaErr) Error ¶
func (e AlgoliaErr) Error() string