✅ validation question
Should I be checking if a entity for a given id exists in my validator or should this be done in the requesthandler of mediator?
I'm using fluent validation
ex:
3 Replies
The request with an ID that doesn't exist isn't invalid, if you ask me
It should probably be handled wherever you query the database
For example throw a custom
NotFoundException
and catch it with the exception handling middleware
Or just return NotFound()
straight if you canWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.got it ty