Skip to content

Commit d7f1c94

Browse files
committed
fix(javascript): do not publish ts (generated)
algolia/api-clients-automation#3966 Co-authored-by: algolia-bot <[email protected]>
1 parent 9c73ec4 commit d7f1c94

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

algolia/errs/no_more_host_to_try_err.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package errs
22

3+
import (
4+
"errors"
5+
"fmt"
6+
)
7+
38
var ErrNoMoreHostToTry = NewNoMoreHostToTryError()
49

510
type NoMoreHostToTryError struct {
@@ -17,5 +22,8 @@ func (e *NoMoreHostToTryError) IntermediateNetworkErrors() []error {
1722
}
1823

1924
func (e *NoMoreHostToTryError) Error() string {
25+
if len(e.intermediateNetworkErrors) > 0 {
26+
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()
27+
}
2028
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."
2129
}

0 commit comments

Comments
 (0)