diff --git a/backend/cmd/stateless_test.go b/backend/cmd/stateless_test.go index 69728bd7988..770a130a70d 100644 --- a/backend/cmd/stateless_test.go +++ b/backend/cmd/stateless_test.go @@ -427,3 +427,12 @@ func TestWebsocketConnContextKey(t *testing.T) { }) } } + +func TestMarshalCustomObject_InvalidJSON(t *testing.T) { + mockInfo := &runtime.Unknown{ + Raw: []byte(`{invalid-json`), + } + + _, err := MarshalCustomObject(mockInfo, "test-context") + assert.Error(t, err) +}