From c2c08d91c45a76549888194c8d2040484dd49520 Mon Sep 17 00:00:00 2001 From: Pallab Pain Date: Fri, 12 Jul 2024 15:52:32 +0530 Subject: [PATCH] fix: propagate meaningful errors --- hscontrol/policy/acls.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hscontrol/policy/acls.go b/hscontrol/policy/acls.go index 462e4a5f4bb..64697e33207 100644 --- a/hscontrol/policy/acls.go +++ b/hscontrol/policy/acls.go @@ -115,14 +115,14 @@ func LoadACLPolicyFromBytes(acl []byte) (*ACLPolicy, error) { ast, err := hujson.Parse(acl) if err != nil { - return nil, err + return nil, fmt.Errorf("parsing hujson, err: %w", err) } ast.Standardize() acl = ast.Pack() if err := json.Unmarshal(acl, &policy); err != nil { - return nil, err + return nil, fmt.Errorf("unmarshalling policy, err: %w", err) } if policy.IsZero() {