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
For some bad requests client should do an action and comparing error message is not an ideal solution for making a decision. ModelState.AddModelError method only accepts two parameters, an error key and a message. Is there a way to achieve this or something similar?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm looking for a way to add error code alongside the error message to
ModelState
.for example
For some bad requests client should do an action and comparing error message is not an ideal solution for making a decision.
ModelState.AddModelError
method only accepts two parameters, an error key and a message. Is there a way to achieve this or something similar?Beta Was this translation helpful? Give feedback.
All reactions