commonMain.com.algolia.client.exception.AlgoliaRuntimeException.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of algoliasearch-client-kotlin-jvm Show documentation
Show all versions of algoliasearch-client-kotlin-jvm Show documentation
"Algolia is a powerful search-as-a-service solution, made easy to use with API clients, UI libraries, and pre-built integrations. Algolia API Client for Kotlin lets you easily use the Algolia Search REST API from your JVM project, such as Android or backend implementations."
package com.algolia.client.exception
/**
* Algolia runtime exception.
*
* @param message the detail message
* @param cause the cause of the exception
*/
public sealed class AlgoliaRuntimeException(
message: String? = null,
cause: Throwable? = null,
) : RuntimeException(message, cause)
/**
* Exception thrown when an error occurs during API requests.
*
* @param message the detail message
* @param cause the cause of the exception
*/
public class AlgoliaClientException(
message: String? = null,
cause: Throwable? = null,
) : AlgoliaRuntimeException(message, cause)
/**
* Exception thrown in case of API failure.
*
* @param message the detail message
* @param cause the cause of the exception
* @param httpErrorCode
*/
public class AlgoliaApiException(
message: String? = null,
cause: Throwable? = null,
public val httpErrorCode: Int? = null,
) : AlgoliaRuntimeException(message, cause)
/**
* Exception thrown when all hosts are unreachable. When several errors occurred, use the last one
* as the cause for the returned exception.
*
* @param exceptions list of thrown exceptions
*/
public class AlgoliaRetryException(
public val exceptions: List,
) : AlgoliaRuntimeException("Error(s) while processing the retry strategy", exceptions.last())
/**
* Exception thrown when an error occurs during the wait strategy. For example: maximum number of
* retry exceeded.
*
* @param message the detail message
*/
public class AlgoliaWaitException(
message: String? = null,
) : AlgoliaRuntimeException(message)
/**
* Exception thrown when an error occurs during an iterable helper execution.
*
* @param message the detail message
*/
public class AlgoliaIterableException(
message: String? = null,
) : AlgoliaRuntimeException(message)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy