Hi, i need some help understanding how Umbraco 14 Backoffice handles requests to server (specially how errors are handled).
I have complete frontend project structure set up.
Request/response flow looks like this:
sever <-> api <-> datasource <-> repository <-> context <-> element
Now lets say i have a IActionResult method in my Controller on a server which might returns Ok(payload) or BadRequest(payload) if something went wrong or if validation failed.
Now when my method returns BadRequest() i want to react to that in my element and display some custom toast notification.
But there always pops up this toast notification with "ApiError" as message.
Is here a nice way to tap into this functionality displaying toast notifications?
Does this have something to do with my datasource returning UmbDataSourceResponse<T>?
I currently have a <uui-toast-notification-container> in my element that i use for my own toast notifications. Could i have used some other mechanism to show those "globally/anytime/anywhere"?
Umbraco 14 - Request Error Handling
Hi, i need some help understanding how Umbraco 14 Backoffice handles requests to server (specially how errors are handled).
I have complete frontend project structure set up. Request/response flow looks like this: sever <-> api <-> datasource <-> repository <-> context <-> element
Now lets say i have a
IActionResultmethod in my Controller on a server which might returnsOk(payload)orBadRequest(payload)if something went wrong or if validation failed.Now when my method returns
BadRequest()i want to react to that in my element and display some custom toast notification. But there always pops up this toast notification with "ApiError" as message.Is here a nice way to tap into this functionality displaying toast notifications? Does this have something to do with my datasource returning
UmbDataSourceResponse<T>?I currently have a
<uui-toast-notification-container>in my element that i use for my own toast notifications. Could i have used some other mechanism to show those "globally/anytime/anywhere"?is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.