Skip to content
Snippets Groups Projects
Commit fa2bb429 authored by Jake Taylor's avatar Jake Taylor
Browse files

added print for 4170

parent 125128c0
No related branches found
No related tags found
3 merge requests!510Release,!365attempt to fix mutex segfault in HandleReceivedRequest,!354Channels impl
......@@ -29,7 +29,7 @@ const (
// Error constants
const (
malformedFactErr = "Failed to load due to " +
"malformed fact"
"malformed fact: %s"
loadConfirmedFactErr = "Failed to load confirmed facts"
loadUnconfirmedFactErr = "Failed to load unconfirmed facts"
saveUnconfirmedFactErr = "Failed to save unconfirmed facts"
......@@ -53,8 +53,8 @@ func newStore(kv *versioned.KV) (*Store, error) {
kv = kv.Prefix(prefix)
s := &Store{
confirmedFacts: make(map[fact.Fact]struct{}, 0),
unconfirmedFacts: make(map[string]fact.Fact, 0),
confirmedFacts: make(map[fact.Fact]struct{}),
unconfirmedFacts: make(map[string]fact.Fact),
kv: kv,
}
......@@ -276,7 +276,8 @@ func (s *Store) unmarshalUnconfirmedFacts(data []byte) (map[string]fact.Fact, er
ufd := ufdList[i]
f, err := fact.UnstringifyFact(ufd.stringifiedFact)
if err != nil {
return unconfirmedFacts, errors.WithMessage(err, malformedFactErr)
return unconfirmedFacts, errors.WithMessagef(err,
malformedFactErr, string(data))
}
unconfirmedFacts[ufd.confirmationId] = f
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment