diff --git a/pkg/actor/mutation_registry.go b/pkg/actor/mutation_registry.go index 970944d..1e5f66a 100644 --- a/pkg/actor/mutation_registry.go +++ b/pkg/actor/mutation_registry.go @@ -12,7 +12,7 @@ import ( type ApplyResult struct { Type string `json:"type"` Mutation proto.Message `json:"mutation"` - Error error `json:"error,omitempty"` + Error string `json:"error,omitempty"` } type MutationRegistry interface { @@ -167,11 +167,11 @@ func (r *ProtoMutationRegistry) Apply(grain any, msg ...proto.Message) ([]ApplyR entry, ok := r.mutationRegistry[rt] r.mutationRegistryMu.RUnlock() if !ok { - results = append(results, ApplyResult{Error: ErrMutationNotRegistered, Type: rt.Name(), Mutation: m}) + results = append(results, ApplyResult{Error: ErrMutationNotRegistered.Error(), Type: rt.Name(), Mutation: m}) continue } err := entry.Handle(grain, m) - results = append(results, ApplyResult{Error: err, Type: rt.Name(), Mutation: m}) + results = append(results, ApplyResult{Error: err.Error(), Type: rt.Name(), Mutation: m}) } // if entry.updateTotals {