diff --git a/x/mongo/driver/topology/errors.go b/x/mongo/driver/topology/errors.go index 1e6936a8c3..c543bacb45 100644 --- a/x/mongo/driver/topology/errors.go +++ b/x/mongo/driver/topology/errors.go @@ -33,6 +33,7 @@ type WaitQueueTimeoutError struct { Wrapped error } +// Error implements the error interface. func (w WaitQueueTimeoutError) Error() string { errorMsg := "timed out while checking out a connection from connection pool" if w.Wrapped != nil { @@ -41,6 +42,7 @@ func (w WaitQueueTimeoutError) Error() string { return errorMsg } +// Unwrap returns the underlying error. func (w WaitQueueTimeoutError) Unwrap() error { return w.Wrapped }