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
The error message that is shown to the end user, which occurs at the abrupt stop of an established connection, contains the type of exception generated at runtime. it would be better to show only the content of the message to have a more user-friendly behavior. Also, it would be better to add the most common errors in the i18n translation files, currently they do not follow the system language.
To reproduce
Start a sharing connection
Stop it before it finishes
Click on the error to see the details
See error
Expected behavior
The error should be more user friendly, not including the DioException [request cancelled] part.
Screenshots
Desktop (please complete the following information)
All OS/versions are affected
Smartphone (please complete the following information)
// app/lib/provider/network/send_provider.dart:442extensiononObject {
Stringget humanErrorMessage {
final e =this;
if (e isDioException&& e.response !=null) {
final body = e.response!.data;
String message;
try {
message = (body asMap)['message'];
} catch (_) {
message = body;
}
return'[${e.response!.statusCode}] $message';
}
return e.toString();
}
}
The text was updated successfully, but these errors were encountered:
Francesco146
changed the title
The error messages are not user-friendly
The error messages are not user-friendly and don't follow i18n translations
May 21, 2024
Describe the bug
The error message that is shown to the end user, which occurs at the abrupt stop of an established connection, contains the type of exception generated at runtime. it would be better to show only the content of the message to have a more user-friendly behavior. Also, it would be better to add the most common errors in the i18n translation files, currently they do not follow the system language.
To reproduce
Expected behavior
The error should be more user friendly, not including the
DioException [request cancelled]
part.Screenshots
Desktop (please complete the following information)
All OS/versions are affected
Smartphone (please complete the following information)
All OS/versions are affected
Additional context
This might be where the changes are needed:
https://github.com/localsend/localsend/blob/8f652cf5696ac1660f4fac6f36f85e28b14ab236/app/lib/provider/network/send_provider.dart#L442C1-L458C2
The text was updated successfully, but these errors were encountered: