Skip to content

Commit 092819b

Browse files
feat(classifier): mongo sse (#3551)
1 parent a47a54b commit 092819b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

flow/alerting/classifier.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"github.com/jackc/pgerrcode"
1818
"github.com/jackc/pgx/v5/pgconn"
1919
"go.mongodb.org/mongo-driver/v2/x/mongo/driver"
20+
"go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology"
2021
"go.temporal.io/sdk/temporal"
2122
"golang.org/x/crypto/ssh"
2223

@@ -618,6 +619,14 @@ func GetErrorClass(ctx context.Context, err error) (ErrorClass, ErrorInfo) {
618619
}
619620
}
620621

622+
var mongoServerError *topology.ServerSelectionError
623+
if errors.As(err, &mongoServerError) {
624+
return ErrorNotifyConnectivity, ErrorInfo{
625+
Source: ErrorSourceMongoDB,
626+
Code: "SERVER_SELECTION_ERROR",
627+
}
628+
}
629+
621630
var chException *clickhouse.Exception
622631
if errors.As(err, &chException) {
623632
chErrorInfo := ErrorInfo{

0 commit comments

Comments
 (0)