Skip to content

Error thrown before the start_time causes delta for end_time to fail  #4

@scott-wyatt

Description

@scott-wyatt

Error

1) test register user should fail when email address already taken and return error (Conduit.UsersTest)
     test/conduit/users/users_test.exs:69
     ** (FunctionClauseError) no function clause matching in Commanded.Middleware.Auditing.delta/1

     The following arguments were given to Commanded.Middleware.Auditing.delta/1:

%Commanded.Middleware.Pipeline{assigns: %{error: :validation_failure, error_reason: %{email: ["has already been taken"]}}, 
...

To Reproduce

Add commanded-audit-middleware to Conduit, and then run mix test.

Suggested Solution

Pattern Matching for delta

for when a delta does not yet have a start_time and error is already thrown.

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