As a team
We want to improve the way we report errors to the user and a way to report errors
So that errors are more meaningful and we provide ways the user can get out of the situation
Initially we will do this at the generic level and then later we will find a way to do this at a more specific level for all the different errors (or at least the most common ones)
Tasks
[x] Share the list of all errors and which category they belong to
[x] Review the categories and descriptions and propose changes that would improve the experience for the user
[x] Define a pattern for showing the category and description and then the specific details of the error (and info about what to do next)
[x] Add a copy button so that users can copy and paste the details of the error
Pattern for showing errors
Heading: Transaction title + domain name if it is in the context of a transaction, error heading if it is standalone
Description: What's happened to the user (not just the system) + how to solve it (even generically)
Event log or technical error message: Collapsed to begin with
Action: An action if there is one to solve the problem, or acknowledgement / close
Design (errors in context of a transaction and separate from transactions)
The transaction has been cancelled as your application prevented the request to proceed. Re-submit your transaction to try again.
User error
Specific errors in place already
Network error
The transaction has been cancelled due to network issues. Make sure your connection is stable, and give it another go.
Backend error
The response couldn't be sent to the backend service. Restart your wallet app, and try again.
Internal error
The transaction has been cancelled as an internal error occurred and could not be recovered. Re-submit your transaction to try again.
Server error
???
Background / Details
In the core we have an error category with a description (broad) and a message (specific) per individual error
case 'Application error': {
return {
title: type,
description: 'The application prevented the request to proceed.',
}
}
case 'Internal error': {
return {
title: type,
description: 'An internal error occurred and could not be recovered. The request has been cancelled.',
}
}
case 'Network error': {
return {
title: type,
description: 'We couldn\'t fulfill your request due to network issues. Make sure your connection to the nodes is stable, and give it another go.',
}
}
case 'User error': {
return {
title: 'Error',
description: '', // No description. This type of error is handled in a specific way.
}
}
Sample of errors:
ApplicationError, ErrNoWalletToConnectTo
ApplicationError, ErrRequestInterrupted
ApplicationError, fmt.Errorf("could not compute the proof-of-work: %w", err)
ApplicationError, fmt.Errorf("could not send transaction: %w", err)
InternalError, fmt.Errorf("could not compute the proof-of-work: %w", err)
InternalError, fmt.Errorf("could not list the available wallets: %w", err)
InternalError, fmt.Errorf("could not marshal input data: %w", err)
InternalError, fmt.Errorf("could not retrieve the wallet associated to the connection: %w", err)
InternalError, fmt.Errorf("could not retrieve the wallet: %w", err)
InternalError, fmt.Errorf("could not sign the transaction: %w", err)
InternalError, fmt.Errorf("could not unlock the wallet: %w", err)
InternalError, fmt.Errorf("could not verify the wallet existence: %w", err)
InternalError, fmt.Errorf("could not verify whether the wallet is already unlock or not: %w", err)
InternalError, fmt.Errorf("requesting the transaction review failed: %w", err)
InternalError, fmt.Errorf("requesting the wallet passphrase failed: %w", err)
InternalError, fmt.Errorf("requesting the wallet selection failed: %w", err)
InternalError, fmt.Errorf("reviewing the wallet connection failed: %w", err)
NetworkError, ErrCouldNotGetChainIDFromNode
NetworkError, ErrCouldNotGetLastBlockInformation
NetworkError, fmt.Errorf("could not find a healthy node: %w", err)
NetworkError, fmt.Errorf("could not get the latest block information from the node: %w", err)
UserError, ErrWalletDoesNotExistUserError
UserError, wallet.ErrWrongPassphrase
As a team We want to improve the way we report errors to the user and a way to report errors So that errors are more meaningful and we provide ways the user can get out of the situation
Initially we will do this at the generic level and then later we will find a way to do this at a more specific level for all the different errors (or at least the most common ones)
Tasks
Pattern for showing errors
Design (errors in context of a transaction and separate from transactions)
https://www.figma.com/file/eMWtbGPxPHfnVSRsxF8M99/Desktop-Wallet?node-id=2608-3545&t=4eB9HKZRWkVF77nT-0
Error Categories + generic messaging
Application error
User error
Network error
Backend error
Internal error
Server error
Background / Details
In the core we have an error category with a description (broad) and a message (specific) per individual error
Sample of errors: