Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicate where an operation has halted #24

Closed
aldesantis opened this issue Jul 3, 2018 · 1 comment
Closed

Indicate where an operation has halted #24

aldesantis opened this issue Jul 3, 2018 · 1 comment

Comments

@aldesantis
Copy link
Member

aldesantis commented Jul 3, 2018

It would be nice to have a way to see what was the last step executed by an operation, so that we can easily understand what is halting an operation.

We could set the last executed step on the operation's skill, e.g.

result = Api::V2::User::Operation::Show.call('id' => 1)
result['result.last_step'] # => "model.find_by"
result['result.failing_step'] # => "policy.default"

result.failing_step here can be computed like this (here be dragons):

steps = Api::V2::User::Operation::Show.skills['pipetree'].instance_variable_get('@index').keys
steps[steps.index(result['result.last_step']) + 1]

This should also be indicated in Pragma::Rails::NoResponseError.

@aldesantis aldesantis changed the title Indicate where an operation was halted Indicate where an operation has halted Jul 15, 2018
@aldesantis
Copy link
Member Author

Moved to pragmarb/pragma-operation#3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant