Skip to content

Commit

Permalink
Merge pull request #320 from maxekman/fix/mongodb-v2-event-store-error
Browse files Browse the repository at this point in the history
Fix / Use correct error in MongoDB v2 event store
  • Loading branch information
maxekman committed Jun 7, 2021
2 parents 629dadc + a81731c commit 706754b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eventstore/mongodb_v2/eventstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (s *EventStore) Save(ctx context.Context, events []eh.Event, originalVersio
bson.M{"$inc": bson.M{"position": len(dbEvents)}},
)
if r.Err() != nil {
return nil, fmt.Errorf("could not increment global position: %w", err)
return nil, fmt.Errorf("could not increment global position: %w", r.Err())
}
allStream := struct {
Position int
Expand Down

0 comments on commit 706754b

Please sign in to comment.