Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-localized error description in ClientException #1442

Open
jv-soares opened this issue Jan 7, 2025 · 0 comments
Open

Non-localized error description in ClientException #1442

jv-soares opened this issue Jan 7, 2025 · 0 comments
Assignees
Labels
package:cupertino_http Issues related to package:cupertino_http type-enhancement A request for a change that isn't a bug

Comments

@jv-soares
Copy link

Hey guys this is rather a question than a feature request.

The problem im facing is that some ClientException errors sent to my crash reporting tool are unreadable and hard to group because they contain localized messages.

For instance, I see ClientException: Неможливо встановити з’єднання для передавання даних, бо триває виклик as an error message and i have no idea what it means.

By taking a quick look at cupertino_client.dart i could find how a ClientException is constructed using NSError.localizedDescription

static void _onComplete(URLSession session, URLSessionTask task, NSError? error) {
    final taskTracker = _tracker(task);
    if (error != null) {
      final exception = ClientException(error.localizedDescription.toString(), taskTracker.request.url);
...

so my question is: is it possible to use a non-localized description instead?

@jv-soares jv-soares added package:cupertino_http Issues related to package:cupertino_http type-enhancement A request for a change that isn't a bug labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:cupertino_http Issues related to package:cupertino_http type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants