From 3f67b5b8ebd78673e2f431f7822f60af53a6efea Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Wed, 14 Sep 2022 13:14:17 -0400 Subject: [PATCH] variables: handler should catch errors before conflicts (#14591) --- nomad/variables_endpoint.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nomad/variables_endpoint.go b/nomad/variables_endpoint.go index b68e82d81..2bfa430ab 100644 --- a/nomad/variables_endpoint.go +++ b/nomad/variables_endpoint.go @@ -169,6 +169,9 @@ func (sv *Variables) makeVariablesApplyResponse( } return &out, nil } + if eResp.IsError() { + return &out, eResp.Error + } // At this point, the response is necessarily a conflict. // Prime output from the encrypted responses metadata