You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The auditing middleware needs to be the first middleware defined in your router to ensure it gets executed before any other middleware can halt command dispatch.
Probably worth doing either or both of the following:
add a note to the README to explain that audit middleware must be defined in a router first (before any halting middleware).
add a check to the success/1 and failure/1 fuctions to ensure the audit middleware has been initialised (and log an error to warn users to define auditing middleware first)
Error
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.
The text was updated successfully, but these errors were encountered: