From e7f9285ac6d63031acb40ae650cd913aa868e051 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Tue, 2 Sep 2025 12:34:46 +0200 Subject: [PATCH 1/8] fix(clients): link to support/help center on unreachable hosts --- tests/CTS/client/search/api.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/CTS/client/search/api.json b/tests/CTS/client/search/api.json index 0ece918c75f..ac4d300c0e9 100644 --- a/tests/CTS/client/search/api.json +++ b/tests/CTS/client/search/api.json @@ -132,17 +132,17 @@ }, "expected": { "error": { - "csharp": "RetryStrategy failed to connect to Algolia. Reason: The operation has timed out.", - "dart": "UnreachableHostsException{errors: [AlgoliaTimeoutException{error: DioException [receive timeout]: The request took longer than 0:00:05.000000 to receive data. It was aborted. To get rid of this exception, try raising the RequestOptions.receiveTimeout above the duration of 0:00:05.000000 or improve the response time of the server.}]}", - "go": "failed to do request: all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. You can use 'ExposeIntermediateNetworkErrors: true' in the config to investigate.", - "java": "Error(s) while processing the retry strategy\\nCaused by: java.net.SocketTimeoutException: timeout", - "javascript": "Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.", - "kotlin": "Error\\\\(s\\\\) while processing the retry strategy", - "php": "Impossible to connect, please check your Algolia Application Id.", - "python": "Unreachable hosts", - "ruby": "Unreachable hosts. Last error for %localhost%: Net::ReadTimeout with #", - "scala": "Error(s) while processing the retry strategy", - "swift": "All hosts are unreachable. You can use 'exposeIntermediateErrors: true' in the config to investigate." + "csharp": "RetryStrategy failed to connect to Algolia. Reason: The operation has timed out. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", + "dart": "UnreachableHostsException{errors: [AlgoliaTimeoutException{error: DioException [receive timeout]: The request took longer than 0:00:05.000000 to receive data. It was aborted. To get rid of this exception, try raising the RequestOptions.receiveTimeout above the duration of 0:00:05.000000 or improve the response time of the server. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.}]}", + "go": "failed to do request: all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. You can use 'ExposeIntermediateNetworkErrors: true' in the config to investigate. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", + "java": "Error(s) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.\\nCaused by: java.net.SocketTimeoutException: timeout", + "javascript": "Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", + "kotlin": "Error\\\\(s\\\\) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", + "php": "Impossible to connect, please check your Algolia Application Id. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", + "python": "Unreachable hosts. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", + "ruby": "Unreachable hosts. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. Last error for %localhost%: Net::ReadTimeout with #", + "scala": "Error(s) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", + "swift": "All hosts are unreachable. You can use 'exposeIntermediateErrors: true' in the config to investigate. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support." } } } From b14459b548449a91c82cb4a83da247e105ea6cc0 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Tue, 2 Sep 2025 13:00:19 +0200 Subject: [PATCH 2/8] fix: implement in every clients --- .../algoliasearch/Transport/HttpTransport.cs | 2 +- .../algolia/errs/no_more_host_to_try_err.go | 6 ++++-- .../com/algolia/exceptions/AlgoliaRetryException.java | 2 +- .../packages/client-common/src/transporter/errors.ts | 2 +- .../algolia/client/exception/AlgoliaRuntimeException.kt | 2 +- .../lib/Exceptions/UnreachableException.php | 2 +- .../algoliasearch/http/transporter.py | 2 +- .../algoliasearch/http/transporter_sync.py | 2 +- .../lib/algolia/transport/transport.rb | 2 +- .../algoliasearch/exception/AlgoliaRuntimeException.scala | 2 +- .../Sources/Core/Networking/HTTP/AlgoliaError.swift | 2 +- tests/CTS/client/search/api.json | 8 ++++---- 12 files changed, 18 insertions(+), 16 deletions(-) diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Transport/HttpTransport.cs b/clients/algoliasearch-client-csharp/algoliasearch/Transport/HttpTransport.cs index 2d64a1a511e..ec1bce07cf2 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Transport/HttpTransport.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Transport/HttpTransport.cs @@ -223,7 +223,7 @@ private async Task ExecuteRequestAsync( } throw new AlgoliaUnreachableHostException( - "RetryStrategy failed to connect to Algolia. Reason: " + _errorMessage + "RetryStrategy failed to connect to Algolia. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. Reason: " + _errorMessage ); } diff --git a/clients/algoliasearch-client-go/algolia/errs/no_more_host_to_try_err.go b/clients/algoliasearch-client-go/algolia/errs/no_more_host_to_try_err.go index fdc72b9c9d5..0a70213c8de 100644 --- a/clients/algoliasearch-client-go/algolia/errs/no_more_host_to_try_err.go +++ b/clients/algoliasearch-client-go/algolia/errs/no_more_host_to_try_err.go @@ -22,10 +22,12 @@ func (e *NoMoreHostToTryError) IntermediateNetworkErrors() []error { } func (e *NoMoreHostToTryError) Error() string { + baseErr := "all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support." + if len(e.intermediateNetworkErrors) > 0 { - return fmt.Errorf("all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. %w", errors.Join(e.intermediateNetworkErrors...)).Error() + return fmt.Errorf("%s %w", baseErr, errors.Join(e.intermediateNetworkErrors...)).Error() } - return "all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. You can use 'ExposeIntermediateNetworkErrors: true' in the config to investigate." + return fmt.Sprintf("%s You can use 'ExposeIntermediateNetworkErrors: true' in the config to investigate.", baseErr) } func (n NoMoreHostToTryError) Is(target error) bool { diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java index 05d334d36b2..86d476e5486 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java @@ -12,7 +12,7 @@ public class AlgoliaRetryException extends AlgoliaRuntimeException { private final List errors; public AlgoliaRetryException(List errors) { - super("Error(s) while processing the retry strategy", errors.get(errors.size() - 1)); + super("Error(s) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", errors.get(errors.size() - 1)); this.errors = errors; } diff --git a/clients/algoliasearch-client-javascript/packages/client-common/src/transporter/errors.ts b/clients/algoliasearch-client-javascript/packages/client-common/src/transporter/errors.ts index b109e04de00..885bf7b99a2 100644 --- a/clients/algoliasearch-client-javascript/packages/client-common/src/transporter/errors.ts +++ b/clients/algoliasearch-client-javascript/packages/client-common/src/transporter/errors.ts @@ -43,7 +43,7 @@ export class ErrorWithStackTrace extends AlgoliaError { export class RetryError extends ErrorWithStackTrace { constructor(stackTrace: StackFrame[]) { super( - 'Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.', + 'Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.', stackTrace, 'RetryError', ); diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/exception/AlgoliaRuntimeException.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/exception/AlgoliaRuntimeException.kt index f2b72dcaab1..2a68cbe2b4a 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/exception/AlgoliaRuntimeException.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/exception/AlgoliaRuntimeException.kt @@ -43,7 +43,7 @@ public class AlgoliaApiException( */ public class AlgoliaRetryException( public val exceptions: List, -) : AlgoliaRuntimeException("Error(s) while processing the retry strategy", exceptions.last()) +) : AlgoliaRuntimeException("Error(s) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", exceptions.last()) /** * Exception thrown when an error occurs during the wait strategy. For example: maximum number of diff --git a/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php b/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php index d4b6e24d40d..26dce25719a 100644 --- a/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php +++ b/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php @@ -8,7 +8,7 @@ public function __construct($message = '', $code = 0, $previous = null) { if (!$message) { $message = - 'Impossible to connect, please check your Algolia Application Id.'; + 'Impossible to connect, please check your Algolia Application Id. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.'; } parent::__construct($message, $code, $previous); diff --git a/clients/algoliasearch-client-python/algoliasearch/http/transporter.py b/clients/algoliasearch-client-python/algoliasearch/http/transporter.py index b82d7aac55d..5a3b211720b 100644 --- a/clients/algoliasearch-client-python/algoliasearch/http/transporter.py +++ b/clients/algoliasearch-client-python/algoliasearch/http/transporter.py @@ -99,7 +99,7 @@ async def request( raise RequestException(content, response.status_code) - raise AlgoliaUnreachableHostException("Unreachable hosts") + raise AlgoliaUnreachableHostException("Unreachable hosts. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.") class EchoTransporter(Transporter): diff --git a/clients/algoliasearch-client-python/algoliasearch/http/transporter_sync.py b/clients/algoliasearch-client-python/algoliasearch/http/transporter_sync.py index 4d11a55e48c..e33bb511da5 100644 --- a/clients/algoliasearch-client-python/algoliasearch/http/transporter_sync.py +++ b/clients/algoliasearch-client-python/algoliasearch/http/transporter_sync.py @@ -112,7 +112,7 @@ def request( raise RequestException(content, response.status_code) - raise AlgoliaUnreachableHostException("Unreachable hosts") + raise AlgoliaUnreachableHostException("Unreachable hosts. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.") class EchoTransporterSync(TransporterSync): diff --git a/clients/algoliasearch-client-ruby/lib/algolia/transport/transport.rb b/clients/algoliasearch-client-ruby/lib/algolia/transport/transport.rb index 8c190b88fc5..0ec0ca020ef 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/transport/transport.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/transport/transport.rb @@ -85,7 +85,7 @@ def request(call_type, method, path, body, opts = {}) end end - raise Algolia::AlgoliaUnreachableHostError.new("Unreachable hosts.", retry_errors) + raise Algolia::AlgoliaUnreachableHostError.new("Unreachable hosts. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", retry_errors) end private diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/exception/AlgoliaRuntimeException.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/exception/AlgoliaRuntimeException.scala index 3572ab592a3..e6d2cff01ac 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/exception/AlgoliaRuntimeException.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/exception/AlgoliaRuntimeException.scala @@ -61,7 +61,7 @@ case class AlgoliaRequestException( case class AlgoliaRetryException( exceptions: List[Throwable] ) extends AlgoliaRuntimeException( - "Error(s) while processing the retry strategy", + "Error(s) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", exceptions.lastOption.orNull ) diff --git a/clients/algoliasearch-client-swift/Sources/Core/Networking/HTTP/AlgoliaError.swift b/clients/algoliasearch-client-swift/Sources/Core/Networking/HTTP/AlgoliaError.swift index 4a7499af1dc..62439a941f7 100644 --- a/clients/algoliasearch-client-swift/Sources/Core/Networking/HTTP/AlgoliaError.swift +++ b/clients/algoliasearch-client-swift/Sources/Core/Networking/HTTP/AlgoliaError.swift @@ -25,7 +25,7 @@ public enum AlgoliaError: Error, LocalizedError { case let .httpError(error): "HTTP error: \(error)" case let .noReachableHosts(errors, exposeIntermediateErrors): - "All hosts are unreachable. " + + "All hosts are unreachable. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. " + ( exposeIntermediateErrors ? "Intermediate errors:\n- \(errors.map(\.localizedDescription).joined(separator: "\n- "))" : diff --git a/tests/CTS/client/search/api.json b/tests/CTS/client/search/api.json index ac4d300c0e9..bf0a0798148 100644 --- a/tests/CTS/client/search/api.json +++ b/tests/CTS/client/search/api.json @@ -132,9 +132,9 @@ }, "expected": { "error": { - "csharp": "RetryStrategy failed to connect to Algolia. Reason: The operation has timed out. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", - "dart": "UnreachableHostsException{errors: [AlgoliaTimeoutException{error: DioException [receive timeout]: The request took longer than 0:00:05.000000 to receive data. It was aborted. To get rid of this exception, try raising the RequestOptions.receiveTimeout above the duration of 0:00:05.000000 or improve the response time of the server. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.}]}", - "go": "failed to do request: all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. You can use 'ExposeIntermediateNetworkErrors: true' in the config to investigate. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", + "csharp": "RetryStrategy failed to connect to Algolia. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. Reason: The operation has timed out.", + "dart": "UnreachableHostsException{errors: [AlgoliaTimeoutException{error: DioException [receive timeout]: The request took longer than 0:00:05.000000 to receive data. It was aborted. To get rid of this exception, try raising the RequestOptions.receiveTimeout above the duration of 0:00:05.000000 or improve the response time of the server., message: If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.}]}", + "go": "failed to do request: all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. You can use 'ExposeIntermediateNetworkErrors: true' in the config to investigate.", "java": "Error(s) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.\\nCaused by: java.net.SocketTimeoutException: timeout", "javascript": "Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", "kotlin": "Error\\\\(s\\\\) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", @@ -142,7 +142,7 @@ "python": "Unreachable hosts. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", "ruby": "Unreachable hosts. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. Last error for %localhost%: Net::ReadTimeout with #", "scala": "Error(s) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", - "swift": "All hosts are unreachable. You can use 'exposeIntermediateErrors: true' in the config to investigate. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support." + "swift": "All hosts are unreachable. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. You can use 'exposeIntermediateErrors: true' in the config to investigate." } } } From d3f70b278d6cacc2f4e567122ec4c5103954d8fc Mon Sep 17 00:00:00 2001 From: shortcuts Date: Tue, 2 Sep 2025 13:12:49 +0200 Subject: [PATCH 3/8] fix: dart --- .../packages/client_core/lib/src/algolia_exception.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart b/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart index 955bbdd7ea2..d6532a8ed0d 100644 --- a/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart +++ b/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart @@ -79,6 +79,6 @@ final class UnreachableHostsException implements AlgoliaException { @override String toString() { - return 'UnreachableHostsException{errors: $errors}'; + return 'UnreachableHostsException{errors: $errors, message: If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.}'; } } From f6639b0a62082ecceac8362aae6791d82e6f0220 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Tue, 2 Sep 2025 13:22:29 +0200 Subject: [PATCH 4/8] fix: dart --- .../packages/client_core/lib/src/algolia_exception.dart | 1 + tests/CTS/client/search/api.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart b/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart index d6532a8ed0d..0f660479e44 100644 --- a/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart +++ b/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart @@ -73,6 +73,7 @@ final class AlgoliaWaitException implements AlgoliaException { final class UnreachableHostsException implements AlgoliaException { /// The list of errors associated with each unreachable host. final List errors; + final String message; /// Constructs an [UnreachableHostsException] with the provided list of errors. const UnreachableHostsException(this.errors); diff --git a/tests/CTS/client/search/api.json b/tests/CTS/client/search/api.json index bf0a0798148..d44b20949a4 100644 --- a/tests/CTS/client/search/api.json +++ b/tests/CTS/client/search/api.json @@ -133,7 +133,7 @@ "expected": { "error": { "csharp": "RetryStrategy failed to connect to Algolia. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. Reason: The operation has timed out.", - "dart": "UnreachableHostsException{errors: [AlgoliaTimeoutException{error: DioException [receive timeout]: The request took longer than 0:00:05.000000 to receive data. It was aborted. To get rid of this exception, try raising the RequestOptions.receiveTimeout above the duration of 0:00:05.000000 or improve the response time of the server., message: If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.}]}", + "dart": "UnreachableHostsException{errors: [AlgoliaTimeoutException{error: DioException [receive timeout]: The request took longer than 0:00:05.000000 to receive data. It was aborted. To get rid of this exception, try raising the RequestOptions.receiveTimeout above the duration of 0:00:05.000000 or improve the response time of the server.}], message: If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.}", "go": "failed to do request: all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. You can use 'ExposeIntermediateNetworkErrors: true' in the config to investigate.", "java": "Error(s) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.\\nCaused by: java.net.SocketTimeoutException: timeout", "javascript": "Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", From a78bbf0396d37586e60c2ec39f5c055dc43ee266 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Tue, 2 Sep 2025 13:42:01 +0200 Subject: [PATCH 5/8] fix: dart --- .../packages/client_core/lib/src/algolia_exception.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart b/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart index 0f660479e44..561581c6e41 100644 --- a/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart +++ b/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart @@ -73,13 +73,14 @@ final class AlgoliaWaitException implements AlgoliaException { final class UnreachableHostsException implements AlgoliaException { /// The list of errors associated with each unreachable host. final List errors; - final String message; + final String message = + "If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support."; /// Constructs an [UnreachableHostsException] with the provided list of errors. const UnreachableHostsException(this.errors); @override String toString() { - return 'UnreachableHostsException{errors: $errors, message: If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.}'; + return 'UnreachableHostsException{errors: $errors, message: $message}'; } } From f8677ee3e673d16498604553bda21bebb5cf246a Mon Sep 17 00:00:00 2001 From: shortcuts Date: Tue, 2 Sep 2025 17:25:38 +0200 Subject: [PATCH 6/8] chore: use real link --- .../algoliasearch/Transport/HttpTransport.cs | 2 +- .../lib/src/algolia_exception.dart | 2 +- .../algolia/errs/no_more_host_to_try_err.go | 2 +- .../exceptions/AlgoliaRetryException.java | 2 +- .../client-common/src/transporter/errors.ts | 2 +- .../exception/AlgoliaRuntimeException.kt | 2 +- .../lib/Exceptions/UnreachableException.php | 2 +- .../algoliasearch/http/transporter.py | 2 +- .../algoliasearch/http/transporter_sync.py | 2 +- .../lib/algolia/transport/transport.rb | 2 +- .../exception/AlgoliaRuntimeException.scala | 2 +- .../Core/Networking/HTTP/AlgoliaError.swift | 2 +- tests/CTS/client/search/api.json | 22 +++++++++---------- 13 files changed, 23 insertions(+), 23 deletions(-) diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Transport/HttpTransport.cs b/clients/algoliasearch-client-csharp/algoliasearch/Transport/HttpTransport.cs index ec1bce07cf2..eb0079b6535 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Transport/HttpTransport.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Transport/HttpTransport.cs @@ -223,7 +223,7 @@ private async Task ExecuteRequestAsync( } throw new AlgoliaUnreachableHostException( - "RetryStrategy failed to connect to Algolia. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. Reason: " + _errorMessage + "RetryStrategy failed to connect to Algolia. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support. Reason: " + _errorMessage ); } diff --git a/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart b/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart index 561581c6e41..e40ab81f549 100644 --- a/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart +++ b/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart @@ -74,7 +74,7 @@ final class UnreachableHostsException implements AlgoliaException { /// The list of errors associated with each unreachable host. final List errors; final String message = - "If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support."; + "If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support."; /// Constructs an [UnreachableHostsException] with the provided list of errors. const UnreachableHostsException(this.errors); diff --git a/clients/algoliasearch-client-go/algolia/errs/no_more_host_to_try_err.go b/clients/algoliasearch-client-go/algolia/errs/no_more_host_to_try_err.go index 0a70213c8de..7f530f92f6b 100644 --- a/clients/algoliasearch-client-go/algolia/errs/no_more_host_to_try_err.go +++ b/clients/algoliasearch-client-go/algolia/errs/no_more_host_to_try_err.go @@ -22,7 +22,7 @@ func (e *NoMoreHostToTryError) IntermediateNetworkErrors() []error { } func (e *NoMoreHostToTryError) Error() string { - baseErr := "all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support." + baseErr := "all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support." if len(e.intermediateNetworkErrors) > 0 { return fmt.Errorf("%s %w", baseErr, errors.Join(e.intermediateNetworkErrors...)).Error() diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java index 86d476e5486..19e11939fd5 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java @@ -12,7 +12,7 @@ public class AlgoliaRetryException extends AlgoliaRuntimeException { private final List errors; public AlgoliaRetryException(List errors) { - super("Error(s) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", errors.get(errors.size() - 1)); + super("Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", errors.get(errors.size() - 1)); this.errors = errors; } diff --git a/clients/algoliasearch-client-javascript/packages/client-common/src/transporter/errors.ts b/clients/algoliasearch-client-javascript/packages/client-common/src/transporter/errors.ts index 885bf7b99a2..03a4bb2f57a 100644 --- a/clients/algoliasearch-client-javascript/packages/client-common/src/transporter/errors.ts +++ b/clients/algoliasearch-client-javascript/packages/client-common/src/transporter/errors.ts @@ -43,7 +43,7 @@ export class ErrorWithStackTrace extends AlgoliaError { export class RetryError extends ErrorWithStackTrace { constructor(stackTrace: StackFrame[]) { super( - 'Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.', + 'Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.', stackTrace, 'RetryError', ); diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/exception/AlgoliaRuntimeException.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/exception/AlgoliaRuntimeException.kt index 2a68cbe2b4a..45d5d0343f0 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/exception/AlgoliaRuntimeException.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/exception/AlgoliaRuntimeException.kt @@ -43,7 +43,7 @@ public class AlgoliaApiException( */ public class AlgoliaRetryException( public val exceptions: List, -) : AlgoliaRuntimeException("Error(s) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", exceptions.last()) +) : AlgoliaRuntimeException("Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", exceptions.last()) /** * Exception thrown when an error occurs during the wait strategy. For example: maximum number of diff --git a/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php b/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php index 26dce25719a..5f1f3353463 100644 --- a/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php +++ b/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php @@ -8,7 +8,7 @@ public function __construct($message = '', $code = 0, $previous = null) { if (!$message) { $message = - 'Impossible to connect, please check your Algolia Application Id. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.'; + 'Impossible to connect, please check your Algolia Application Id. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.'; } parent::__construct($message, $code, $previous); diff --git a/clients/algoliasearch-client-python/algoliasearch/http/transporter.py b/clients/algoliasearch-client-python/algoliasearch/http/transporter.py index 5a3b211720b..747b7f3bc5b 100644 --- a/clients/algoliasearch-client-python/algoliasearch/http/transporter.py +++ b/clients/algoliasearch-client-python/algoliasearch/http/transporter.py @@ -99,7 +99,7 @@ async def request( raise RequestException(content, response.status_code) - raise AlgoliaUnreachableHostException("Unreachable hosts. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.") + raise AlgoliaUnreachableHostException("Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.") class EchoTransporter(Transporter): diff --git a/clients/algoliasearch-client-python/algoliasearch/http/transporter_sync.py b/clients/algoliasearch-client-python/algoliasearch/http/transporter_sync.py index e33bb511da5..8d65c4a9164 100644 --- a/clients/algoliasearch-client-python/algoliasearch/http/transporter_sync.py +++ b/clients/algoliasearch-client-python/algoliasearch/http/transporter_sync.py @@ -112,7 +112,7 @@ def request( raise RequestException(content, response.status_code) - raise AlgoliaUnreachableHostException("Unreachable hosts. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.") + raise AlgoliaUnreachableHostException("Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.") class EchoTransporterSync(TransporterSync): diff --git a/clients/algoliasearch-client-ruby/lib/algolia/transport/transport.rb b/clients/algoliasearch-client-ruby/lib/algolia/transport/transport.rb index 0ec0ca020ef..fc0a3c7db05 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/transport/transport.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/transport/transport.rb @@ -85,7 +85,7 @@ def request(call_type, method, path, body, opts = {}) end end - raise Algolia::AlgoliaUnreachableHostError.new("Unreachable hosts. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", retry_errors) + raise Algolia::AlgoliaUnreachableHostError.new("Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", retry_errors) end private diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/exception/AlgoliaRuntimeException.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/exception/AlgoliaRuntimeException.scala index e6d2cff01ac..d8e574d8062 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/exception/AlgoliaRuntimeException.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/exception/AlgoliaRuntimeException.scala @@ -61,7 +61,7 @@ case class AlgoliaRequestException( case class AlgoliaRetryException( exceptions: List[Throwable] ) extends AlgoliaRuntimeException( - "Error(s) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", + "Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", exceptions.lastOption.orNull ) diff --git a/clients/algoliasearch-client-swift/Sources/Core/Networking/HTTP/AlgoliaError.swift b/clients/algoliasearch-client-swift/Sources/Core/Networking/HTTP/AlgoliaError.swift index 62439a941f7..9c4e2f6a556 100644 --- a/clients/algoliasearch-client-swift/Sources/Core/Networking/HTTP/AlgoliaError.swift +++ b/clients/algoliasearch-client-swift/Sources/Core/Networking/HTTP/AlgoliaError.swift @@ -25,7 +25,7 @@ public enum AlgoliaError: Error, LocalizedError { case let .httpError(error): "HTTP error: \(error)" case let .noReachableHosts(errors, exposeIntermediateErrors): - "All hosts are unreachable. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. " + + "All hosts are unreachable. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support. " + ( exposeIntermediateErrors ? "Intermediate errors:\n- \(errors.map(\.localizedDescription).joined(separator: "\n- "))" : diff --git a/tests/CTS/client/search/api.json b/tests/CTS/client/search/api.json index d44b20949a4..cf4bc04b228 100644 --- a/tests/CTS/client/search/api.json +++ b/tests/CTS/client/search/api.json @@ -132,17 +132,17 @@ }, "expected": { "error": { - "csharp": "RetryStrategy failed to connect to Algolia. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. Reason: The operation has timed out.", - "dart": "UnreachableHostsException{errors: [AlgoliaTimeoutException{error: DioException [receive timeout]: The request took longer than 0:00:05.000000 to receive data. It was aborted. To get rid of this exception, try raising the RequestOptions.receiveTimeout above the duration of 0:00:05.000000 or improve the response time of the server.}], message: If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.}", - "go": "failed to do request: all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. You can use 'ExposeIntermediateNetworkErrors: true' in the config to investigate.", - "java": "Error(s) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.\\nCaused by: java.net.SocketTimeoutException: timeout", - "javascript": "Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", - "kotlin": "Error\\\\(s\\\\) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", - "php": "Impossible to connect, please check your Algolia Application Id. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", - "python": "Unreachable hosts. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", - "ruby": "Unreachable hosts. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. Last error for %localhost%: Net::ReadTimeout with #", - "scala": "Error(s) while processing the retry strategy. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support.", - "swift": "All hosts are unreachable. If the error persists, please visit our help center or reach out to the Algolia Support team: https://alg.li/support. You can use 'exposeIntermediateErrors: true' in the config to investigate." + "csharp": "RetryStrategy failed to connect to Algolia. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support. Reason: The operation has timed out.", + "dart": "UnreachableHostsException{errors: [AlgoliaTimeoutException{error: DioException [receive timeout]: The request took longer than 0:00:05.000000 to receive data. It was aborted. To get rid of this exception, try raising the RequestOptions.receiveTimeout above the duration of 0:00:05.000000 or improve the response time of the server.}], message: If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.}", + "go": "failed to do request: all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support. You can use 'ExposeIntermediateNetworkErrors: true' in the config to investigate.", + "java": "Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.\\nCaused by: java.net.SocketTimeoutException: timeout", + "javascript": "Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", + "kotlin": "Error\\\\(s\\\\) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", + "php": "Impossible to connect, please check your Algolia Application Id. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", + "python": "Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", + "ruby": "Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support. Last error for %localhost%: Net::ReadTimeout with #", + "scala": "Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", + "swift": "All hosts are unreachable. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support. You can use 'exposeIntermediateErrors: true' in the config to investigate." } } } From 0c97ef85ef663b2c0e6435c5982bb633468b9636 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Tue, 2 Sep 2025 17:28:10 +0200 Subject: [PATCH 7/8] chore: remove dot --- .../algoliasearch/Transport/HttpTransport.cs | 2 +- .../lib/src/algolia_exception.dart | 2 +- .../algolia/errs/no_more_host_to_try_err.go | 2 +- .../exceptions/AlgoliaRetryException.java | 2 +- .../client-common/src/transporter/errors.ts | 2 +- .../exception/AlgoliaRuntimeException.kt | 2 +- .../lib/Exceptions/UnreachableException.php | 2 +- .../algoliasearch/http/transporter.py | 2 +- .../algoliasearch/http/transporter_sync.py | 2 +- .../lib/algolia/transport/transport.rb | 2 +- .../exception/AlgoliaRuntimeException.scala | 2 +- .../Core/Networking/HTTP/AlgoliaError.swift | 2 +- tests/CTS/client/search/api.json | 22 +++++++++---------- 13 files changed, 23 insertions(+), 23 deletions(-) diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Transport/HttpTransport.cs b/clients/algoliasearch-client-csharp/algoliasearch/Transport/HttpTransport.cs index eb0079b6535..2634cdf68cf 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Transport/HttpTransport.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Transport/HttpTransport.cs @@ -223,7 +223,7 @@ private async Task ExecuteRequestAsync( } throw new AlgoliaUnreachableHostException( - "RetryStrategy failed to connect to Algolia. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support. Reason: " + _errorMessage + "RetryStrategy failed to connect to Algolia. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support Reason: " + _errorMessage ); } diff --git a/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart b/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart index e40ab81f549..8fb9847cfe4 100644 --- a/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart +++ b/clients/algoliasearch-client-dart/packages/client_core/lib/src/algolia_exception.dart @@ -74,7 +74,7 @@ final class UnreachableHostsException implements AlgoliaException { /// The list of errors associated with each unreachable host. final List errors; final String message = - "If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support."; + "If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support"; /// Constructs an [UnreachableHostsException] with the provided list of errors. const UnreachableHostsException(this.errors); diff --git a/clients/algoliasearch-client-go/algolia/errs/no_more_host_to_try_err.go b/clients/algoliasearch-client-go/algolia/errs/no_more_host_to_try_err.go index 7f530f92f6b..9ac4268c5f1 100644 --- a/clients/algoliasearch-client-go/algolia/errs/no_more_host_to_try_err.go +++ b/clients/algoliasearch-client-go/algolia/errs/no_more_host_to_try_err.go @@ -22,7 +22,7 @@ func (e *NoMoreHostToTryError) IntermediateNetworkErrors() []error { } func (e *NoMoreHostToTryError) Error() string { - baseErr := "all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support." + baseErr := "all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support" if len(e.intermediateNetworkErrors) > 0 { return fmt.Errorf("%s %w", baseErr, errors.Join(e.intermediateNetworkErrors...)).Error() diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java index 19e11939fd5..8b84c932019 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java @@ -12,7 +12,7 @@ public class AlgoliaRetryException extends AlgoliaRuntimeException { private final List errors; public AlgoliaRetryException(List errors) { - super("Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", errors.get(errors.size() - 1)); + super("Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support", errors.get(errors.size() - 1)); this.errors = errors; } diff --git a/clients/algoliasearch-client-javascript/packages/client-common/src/transporter/errors.ts b/clients/algoliasearch-client-javascript/packages/client-common/src/transporter/errors.ts index 03a4bb2f57a..5fa5306ccbe 100644 --- a/clients/algoliasearch-client-javascript/packages/client-common/src/transporter/errors.ts +++ b/clients/algoliasearch-client-javascript/packages/client-common/src/transporter/errors.ts @@ -43,7 +43,7 @@ export class ErrorWithStackTrace extends AlgoliaError { export class RetryError extends ErrorWithStackTrace { constructor(stackTrace: StackFrame[]) { super( - 'Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.', + 'Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support', stackTrace, 'RetryError', ); diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/exception/AlgoliaRuntimeException.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/exception/AlgoliaRuntimeException.kt index 45d5d0343f0..fd8866b1a6d 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/exception/AlgoliaRuntimeException.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/exception/AlgoliaRuntimeException.kt @@ -43,7 +43,7 @@ public class AlgoliaApiException( */ public class AlgoliaRetryException( public val exceptions: List, -) : AlgoliaRuntimeException("Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", exceptions.last()) +) : AlgoliaRuntimeException("Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support", exceptions.last()) /** * Exception thrown when an error occurs during the wait strategy. For example: maximum number of diff --git a/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php b/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php index 5f1f3353463..a60c6ea1b41 100644 --- a/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php +++ b/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php @@ -8,7 +8,7 @@ public function __construct($message = '', $code = 0, $previous = null) { if (!$message) { $message = - 'Impossible to connect, please check your Algolia Application Id. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.'; + 'Impossible to connect, please check your Algolia Application Id. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support'; } parent::__construct($message, $code, $previous); diff --git a/clients/algoliasearch-client-python/algoliasearch/http/transporter.py b/clients/algoliasearch-client-python/algoliasearch/http/transporter.py index 747b7f3bc5b..95b44fd9790 100644 --- a/clients/algoliasearch-client-python/algoliasearch/http/transporter.py +++ b/clients/algoliasearch-client-python/algoliasearch/http/transporter.py @@ -99,7 +99,7 @@ async def request( raise RequestException(content, response.status_code) - raise AlgoliaUnreachableHostException("Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.") + raise AlgoliaUnreachableHostException("Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support") class EchoTransporter(Transporter): diff --git a/clients/algoliasearch-client-python/algoliasearch/http/transporter_sync.py b/clients/algoliasearch-client-python/algoliasearch/http/transporter_sync.py index 8d65c4a9164..5d79a3e7d3e 100644 --- a/clients/algoliasearch-client-python/algoliasearch/http/transporter_sync.py +++ b/clients/algoliasearch-client-python/algoliasearch/http/transporter_sync.py @@ -112,7 +112,7 @@ def request( raise RequestException(content, response.status_code) - raise AlgoliaUnreachableHostException("Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.") + raise AlgoliaUnreachableHostException("Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support") class EchoTransporterSync(TransporterSync): diff --git a/clients/algoliasearch-client-ruby/lib/algolia/transport/transport.rb b/clients/algoliasearch-client-ruby/lib/algolia/transport/transport.rb index fc0a3c7db05..3519d7cbbd9 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/transport/transport.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/transport/transport.rb @@ -85,7 +85,7 @@ def request(call_type, method, path, body, opts = {}) end end - raise Algolia::AlgoliaUnreachableHostError.new("Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", retry_errors) + raise Algolia::AlgoliaUnreachableHostError.new("Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support", retry_errors) end private diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/exception/AlgoliaRuntimeException.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/exception/AlgoliaRuntimeException.scala index d8e574d8062..78f4bd3e9d4 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/exception/AlgoliaRuntimeException.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/exception/AlgoliaRuntimeException.scala @@ -61,7 +61,7 @@ case class AlgoliaRequestException( case class AlgoliaRetryException( exceptions: List[Throwable] ) extends AlgoliaRuntimeException( - "Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", + "Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support", exceptions.lastOption.orNull ) diff --git a/clients/algoliasearch-client-swift/Sources/Core/Networking/HTTP/AlgoliaError.swift b/clients/algoliasearch-client-swift/Sources/Core/Networking/HTTP/AlgoliaError.swift index 9c4e2f6a556..26986186a7d 100644 --- a/clients/algoliasearch-client-swift/Sources/Core/Networking/HTTP/AlgoliaError.swift +++ b/clients/algoliasearch-client-swift/Sources/Core/Networking/HTTP/AlgoliaError.swift @@ -25,7 +25,7 @@ public enum AlgoliaError: Error, LocalizedError { case let .httpError(error): "HTTP error: \(error)" case let .noReachableHosts(errors, exposeIntermediateErrors): - "All hosts are unreachable. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support. " + + "All hosts are unreachable. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support " + ( exposeIntermediateErrors ? "Intermediate errors:\n- \(errors.map(\.localizedDescription).joined(separator: "\n- "))" : diff --git a/tests/CTS/client/search/api.json b/tests/CTS/client/search/api.json index cf4bc04b228..0dc964fb23d 100644 --- a/tests/CTS/client/search/api.json +++ b/tests/CTS/client/search/api.json @@ -132,17 +132,17 @@ }, "expected": { "error": { - "csharp": "RetryStrategy failed to connect to Algolia. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support. Reason: The operation has timed out.", - "dart": "UnreachableHostsException{errors: [AlgoliaTimeoutException{error: DioException [receive timeout]: The request took longer than 0:00:05.000000 to receive data. It was aborted. To get rid of this exception, try raising the RequestOptions.receiveTimeout above the duration of 0:00:05.000000 or improve the response time of the server.}], message: If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.}", - "go": "failed to do request: all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support. You can use 'ExposeIntermediateNetworkErrors: true' in the config to investigate.", - "java": "Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.\\nCaused by: java.net.SocketTimeoutException: timeout", - "javascript": "Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", - "kotlin": "Error\\\\(s\\\\) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", - "php": "Impossible to connect, please check your Algolia Application Id. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", - "python": "Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", - "ruby": "Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support. Last error for %localhost%: Net::ReadTimeout with #", - "scala": "Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support.", - "swift": "All hosts are unreachable. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support. You can use 'exposeIntermediateErrors: true' in the config to investigate." + "csharp": "RetryStrategy failed to connect to Algolia. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support Reason: The operation has timed out.", + "dart": "UnreachableHostsException{errors: [AlgoliaTimeoutException{error: DioException [receive timeout]: The request took longer than 0:00:05.000000 to receive data. It was aborted. To get rid of this exception, try raising the RequestOptions.receiveTimeout above the duration of 0:00:05.000000 or improve the response time of the server.}], message: If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support}", + "go": "failed to do request: all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support You can use 'ExposeIntermediateNetworkErrors: true' in the config to investigate.", + "java": "Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support\\nCaused by: java.net.SocketTimeoutException: timeout", + "javascript": "Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support", + "kotlin": "Error\\\\(s\\\\) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support", + "php": "Impossible to connect, please check your Algolia Application Id. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support", + "python": "Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support", + "ruby": "Unreachable hosts. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support Last error for %localhost%: Net::ReadTimeout with #", + "scala": "Error(s) while processing the retry strategy. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support", + "swift": "All hosts are unreachable. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support You can use 'exposeIntermediateErrors: true' in the config to investigate." } } } From d5e30eb89663587d543109f5dca551af15e035a5 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Wed, 3 Sep 2025 10:43:18 +0200 Subject: [PATCH 8/8] fix: php nice --- .../lib/Exceptions/UnreachableException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php b/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php index 551abc3386f..526df74017b 100644 --- a/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php +++ b/clients/algoliasearch-client-php/lib/Exceptions/UnreachableException.php @@ -7,7 +7,7 @@ final class UnreachableException extends AlgoliaException public function __construct($message = '', $code = 0, $previous = null) { if (!$message) { - $message = + $message = 'Impossible to connect, please check your Algolia Application Id. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support'; }