Hi Guys,
If you are loading a view or a partial view, how do you correctly throw an error (for example if a permission check has been run to verify user is authorized to view view) and then handle the thrown error?
We've tried working with UserFriendlyException but as far as we can ascertain, there is a mismatch between the return types and error handling types. If our understanding is correct, when requesting a view, the request is expecting an html view/error view to return, but the UserFriendlyException returns a json format error?
Thanks
4 Answer(s)
-
0
@davidharrison are you trying to open a modal or is it a partial view on a page ? If it is a modal, ModalManager should handle it and show a proper error message.
-
0
Hi @ismcagdas,
Yes we are trying to open a modal.
What type of exceptions can the ModalManager handle? a UserFriendlyException or another type?
Thanks,
David
-
0
closed due to inactivity.