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
Currently if a request fails the end user does not get notified of the result of the request.
Most fetch call is wrapped in a try catch that silently logs the error with console.error().
Proposal
An api service, which handles the unsuccessful requests and return a typed response. Something like:
awaitget<Networks>('/rest/listNetworks')
The service should:
Fetch the data with appropriate authentication
Notify the user (maybe via toast service) of any errors that occurred
Cast the json response to T type
return the data
Let me know if you are interested in the proposed feature.
The text was updated successfully, but these errors were encountered:
Problem
Currently if a request fails the end user does not get notified of the result of the request.
Most fetch call is wrapped in a try catch that silently logs the error with
console.error()
.Proposal
An api service, which handles the unsuccessful requests and return a typed response. Something like:
The service should:
Let me know if you are interested in the proposed feature.
The text was updated successfully, but these errors were encountered: