-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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:
await get<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.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request