Skip to content

Commit

Permalink
kv: fix typo on error type
Browse files Browse the repository at this point in the history
Signed-off-by: Waldemar Quevedo <wally@nats.io>
  • Loading branch information
wallyqs committed Aug 11, 2022
1 parent fb5ca2c commit 920ea56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ var (
ErrBadBucket = errors.New("nats: bucket not valid key-value store")
ErrKeyNotFound = errors.New("nats: key not found")
ErrKeyDeleted = errors.New("nats: key was deleted")
ErrHistoryToLarge = errors.New("nats: history limited to a max of 64")
ErrHistoryTooLarge = errors.New("nats: history limited to a max of 64")
ErrNoKeysFound = errors.New("nats: no keys found")
)

Expand Down Expand Up @@ -356,7 +356,7 @@ func (js *js) CreateKeyValue(cfg *KeyValueConfig) (KeyValue, error) {
history := int64(1)
if cfg.History > 0 {
if cfg.History > KeyValueMaxHistory {
return nil, ErrHistoryToLarge
return nil, ErrHistoryTooLarge
}
history = int64(cfg.History)
}
Expand Down

0 comments on commit 920ea56

Please sign in to comment.