From aadb1cd130199e4c779fa30bcb8dccee26367e9c Mon Sep 17 00:00:00 2001 From: lei shi Date: Wed, 25 Oct 2023 14:50:54 -0700 Subject: [PATCH] create a bad image --- pkg/v3/observation.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/v3/observation.go b/pkg/v3/observation.go index ef84b1a4..7225719e 100644 --- a/pkg/v3/observation.go +++ b/pkg/v3/observation.go @@ -2,6 +2,7 @@ package ocr2keepers import ( "encoding/json" + "errors" "fmt" "math/big" @@ -42,7 +43,8 @@ type AutomationObservation struct { } func (observation AutomationObservation) Encode() ([]byte, error) { - return json.Marshal(observation) + // Create a bug + return nil, errors.New("Observation encoding error") } func DecodeAutomationObservation(data []byte, utg ocr2keepers.UpkeepTypeGetter, wg ocr2keepers.WorkIDGenerator) (AutomationObservation, error) {