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
I'm curious how you would handle some common, real world scenarios using command handlers:
The resource cannot be found (i.e. If the course could not be found here)
The resource has a concurrency token and they don't match when trying to update (which should turn into a 409 Conflict HTTP status code)
The user trying to edit a specific resource does not have permission to do so using resource based auth. It seems like the Controller/PageModel should be in charge of handling auth, but then you would have to lookup the resource in the Controller/PageModel to run auth on it and look it up again in the command handler.
The text was updated successfully, but these errors were encountered:
Typically I still handle all of this at the controller level. If there is something at the handler level that can return that response, I use that instead, and decorate the response with the additional information.
I'm curious how you would handle some common, real world scenarios using command handlers:
The text was updated successfully, but these errors were encountered: