diff --git a/client/status/v2.go b/client/status/v2.go index d9bc0190..5978efe8 100644 --- a/client/status/v2.go +++ b/client/status/v2.go @@ -58,6 +58,8 @@ func FromStatusV2(st *status.Status) Status { decoder = new(WrongMagicNumber) case status.SignatureVerificationFail: decoder = new(SignatureVerification) + case status.NodeUnderMaintenance: + decoder = new(NodeUnderMaintenance) } case object.LocalizeFailStatus(&code): switch code { diff --git a/client/status/v2_test.go b/client/status/v2_test.go index 5e1e5aee..8615bb99 100644 --- a/client/status/v2_test.go +++ b/client/status/v2_test.go @@ -125,6 +125,12 @@ func TestToStatusV2(t *testing.T) { }), codeV2: 4097, }, + { + status: (statusConstructor)(func() apistatus.Status { + return new(apistatus.NodeUnderMaintenance) + }), + codeV2: 1027, + }, } { var st apistatus.Status @@ -272,6 +278,12 @@ func TestFromStatusV2(t *testing.T) { }), codeV2: 4097, }, + { + status: (statusConstructor)(func() apistatus.Status { + return new(apistatus.NodeUnderMaintenance) + }), + codeV2: 1027, + }, } { var st apistatus.Status