Skip to content

Commit

Permalink
fix(rest): add recoverable error message
Browse files Browse the repository at this point in the history
Signed-off-by: Jiyong Huang <huangjy@emqx.io>
  • Loading branch information
ngjaying committed Dec 24, 2024
1 parent 7f8bc2e commit 9053a38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/errorx/errors.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021-2023 EMQ Technologies Co., Ltd.
// Copyright 2021-2024 EMQ Technologies Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -46,7 +46,7 @@ type ErrorWithCode interface {
}

func IsRecoverAbleError(err error) bool {
if strings.Contains(err.Error(), "connection reset by peer") {
if strings.Contains(err.Error(), "connection reset by peer") || strings.Contains(err.Error(), "No connection could be made") {
return true
}
if urlErr, ok := err.(*url.Error); ok {
Expand Down

0 comments on commit 9053a38

Please sign in to comment.