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

Remove the message 'The request was manually cancelled by the user.' for canceltoken.cancel() #2217

Closed
someshswami9 opened this issue May 16, 2024 · 1 comment

Comments

@someshswami9
Copy link

Request Statement

Dio can show the message which is sent by user or if don't then don't show the message as that is not acceptable . as random message is visible on users screen.

Solution Brainstorm

Just remove the hardcoded message from Dio

factory DioException.requestCancelled({
required RequestOptions requestOptions,
required Object? reason,
StackTrace? stackTrace,
}) =>
DioException(
type: DioExceptionType.cancel,
message: 'The request was manually cancelled by the user.',
requestOptions: requestOptions,
response: null,
error: reason,
stackTrace: stackTrace,
);

@someshswami9 someshswami9 added the s: feature This issue indicates a feature request label May 16, 2024
@someshswami9 someshswami9 changed the title Remove The request was manually cancelled by the user. for canceltoken.cancel() Remove the message 'The request was manually cancelled by the user.' for canceltoken.cancel() May 16, 2024
@AlexV525
Copy link
Member

AlexV525 commented May 16, 2024

We don't show the message to the screen. In general, showing raw exceptions on screen could be a bad solution.

@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
@AlexV525 AlexV525 added i: not related and removed s: feature This issue indicates a feature request labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants