async def METHOD_NAME(inp: str, ctx: bentoml.Context):
    if "error" in ctx.request.query_params:
        ctx.response.status_code = 400
        return ctx.request.query_params["error"]
    elif "state" in ctx.request.query_params:
        return ctx.state[ctx.request.query_params["state"]]
    return inp