Skip to content

_execute not passing down context to nested ValidatedMethods #72

@workflow

Description

@workflow

First, thank you for this highly useful package! 🎉

I have the following situation:

One ValidatedMethod (on the server) A is calling another ValidatedMethod B (again on the server only).
Now if I _execute() the outer method A and pass it a userId context, that userId gets lost in the inner method B, and userId is again undefined.

Reproduction

https://github.com/workflow/validated-method-repro

Outcome

I20170425-21:29:03.151(2)? Outer method userId:  fXHHHMYTzzk3i4eKf
I20170425-21:29:03.152(2)? Inner method userId:  null

Desired

I20170425-21:29:03.151(2)? Outer method userId:  fXHHHMYTzzk3i4eKf
I20170425-21:29:03.152(2)? Inner method userId:  fXHHHMYTzzk3i4eKf

The only workaround I've found so far is to _execute B instead of calling it, explicitly passing down the userId. Not very pretty, since this affects production code to make the tests work.

Metadata

Metadata

Assignees

No one assigned

    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