mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
fix error message
This commit is contained in:
@@ -20,7 +20,7 @@ func (sw *ScriptWASM) Process(ctx context.Context, payload any) (any, error) {
|
|||||||
payloadBytes, ok := GetAnyAs[[]byte](payload)
|
payloadBytes, ok := GetAnyAs[[]byte](payload)
|
||||||
|
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, fmt.Errorf("script.wasm can only operator on byte array")
|
return nil, fmt.Errorf("script.wasm can only process a byte array")
|
||||||
}
|
}
|
||||||
|
|
||||||
program, err := sw.Program.Instance(ctx, extism.PluginInstanceConfig{})
|
program, err := sw.Program.Instance(ctx, extism.PluginInstanceConfig{})
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ func TestBadScriptWASM(t *testing.T) {
|
|||||||
"enableWasi": true,
|
"enableWasi": true,
|
||||||
},
|
},
|
||||||
payload: "hello",
|
payload: "hello",
|
||||||
errorString: "script.wasm can only operator on byte array",
|
errorString: "script.wasm can only process a byte array",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "function not found in module",
|
name: "function not found in module",
|
||||||
|
|||||||
Reference in New Issue
Block a user