Skip to content

JS Express Testapp Routes Do Not Register As Documented #3641

@Zozman

Description

@Zozman

When running the Express testapp for testing the @genkit-ai/express middleware, some of the documented curl commands do not work. For example, the url http://localhost:8080/jokeFlow?stream=true -d '{"data": "banana"}' -H "content-type: application/json" -H "authorization: open sesame" command documented here does not work because the f.name value does not equal the name of the flow. It equals actionFn instead.

In addition, other curl commands such as curl http://localhost:8080/jokeHandler?stream=true -d '{"data": "banana"}' -H "content-type: application/json" do not return a UserFacxingError as expected and instead return an Internal Service Error due to it having issues with the context object and the server throwing TypeError: Cannot read properties of undefined (reading 'username') errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions