subspace-desktop icon indicating copy to clipboard operation
subspace-desktop copied to clipboard

Error page: add specific error resolutions

Open isSerge opened this issue 3 years ago • 1 comments

image

The current error page body has a generic message, we need to add specific resolutions for these cases:

  • could not update or read the config file
  • could not start node
  • could not start farming

Also, it will be nice to add more details on how to contact the team

isSerge avatar Aug 08 '22 14:08 isSerge

For the startFarmer function in store.ts -> I think the error handling there is misleading and I suggest some changes.

Background info:

  • Lines: https://github.com/subspace/subspace-desktop/blob/main/src/stores/store.ts#L316-L324 are responsible from the successful farmer start on the tauri/backend side. If an error happens in here, it means there is a problem in the backend related to farming function.

  • Lines: https://github.com/subspace/subspace-desktop/blob/main/src/stores/store.ts#L316-L324 are responsible from the syncing process, if a problem happens in these lines, it means that a problem happened between the farmer-node connection, and this connection was related to syncing process

  • Lines: https://github.com/subspace/subspace-desktop/blob/main/src/stores/store.ts#L316-L324 are responsible from starting a successful block subscription, and if a problem happens, it means there is problem between the node and farmer again, but this time, for block subscription.

Why it is misleading:

all these 3 possible errors are handled with a single error message, namely "farmer start error". And this is misleading, because in the 2nd and the 3rd scenario I described above, the farmer INDEED started successfully. This error message will confuse both the users and us (the developers).

2 solutions comes to my mind: 1- have a separate try/catch block for all of them, and in the catch block, handle the respective error with a relevant error message 2- separate the 2nd and the 3rd scenarios into another function, and handle the errors in those functions.

ozgunozerk avatar Aug 22 '22 11:08 ozgunozerk