Skip to content

config example is raising a wasm error #31

Description

@fliepeltje

I'm getting the following output when running the configs example from the readme:

Error: wasm error: unreachable
wasm stack trace:
        .$10486(i32,i32,i32,i32,i32)
        .$10772(i32,i32)
        .$10792(i32,i32,i32,i32,i32)
        .$10827(i32,i32) i32
        .$10846() i32
returned non-zero exit code: 1

I figured out that it is because it should in fact be a get_str call:

import extism

@extism.plugin_fn
def greet():
  user = extism.Config.get_str("user")
  extism.output_str(f"Hello, {user}!")

But I find the output of this mistake quite scary; I'm unsure if it is somehow possible to throw up something a bit friendlier when you try to access a non-existent method or var?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions