Skip to content

Call parameters validation #7

@vibze

Description

@vibze

Firstly, thank you for making this great library. I really like the simplicity of it and how it also simplifies the service pattern with bubbling exceptions.

I have run into some head scratching today when I got
private method fail called for nil:Class today.

After looking at code it appeared that service initialization in call method was failing because I have passed ActionController::Parameters instance in place of parameters. So initializer failed and there was no instance of service in rescue block.

Maybe it could be feasible to validate parameters or make some kind of universal conversion for them so it won't break on initialization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions