Add standard error-handling for parse failure

This commit is contained in:
Buck Doyle 2019-08-29 11:12:02 -05:00
parent 8b06712d21
commit 5495a7e689

View file

@ -268,7 +268,7 @@ func (a *ACL) GetPolicy(args *structs.ACLPolicySpecificRequest, reply *structs.S
rules, err := policy.Parse(out.Rules)
if err != nil {
// FIXME what to do? should be impossible?
return err
} else {
reply.Policy.RulesJSON = rules
}