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
This is a feature request for inversify-express-utils. Controllers that extend BaseHttpController have access to a this.conflict method, but this method does not take any arguments. Using this.json is an easy workaround, but I would still like this.conflict to take an optional generic argument.
Expected Behavior
I would expect this.conflict to take a generic argument that allows me to explain why the conflict occurred.
Current Behavior
I cannot provide an argument, so this.conflict just returns a 409 code.
Context
Let's say I get a POST /users request. It may conflict because (1) the provided username already exists or (2) the provided email already exists. The API should return which conflict actually occurred.
The text was updated successfully, but these errors were encountered:
This is a feature request for inversify-express-utils. Controllers that extend
BaseHttpController
have access to athis.conflict
method, but this method does not take any arguments. Usingthis.json
is an easy workaround, but I would still likethis.conflict
to take an optional generic argument.Expected Behavior
I would expect
this.conflict
to take a generic argument that allows me to explain why the conflict occurred.Current Behavior
I cannot provide an argument, so
this.conflict
just returns a409
code.Context
Let's say I get a
POST /users
request. It may conflict because (1) the provided username already exists or (2) the provided email already exists. The API should return which conflict actually occurred.The text was updated successfully, but these errors were encountered: