Open longbmk opened 1 month ago
@Anais-bitmark Please help design the error message for a connection timeout: This error occurs when a user tries to view or explore something (eg: user clicks on explore exhibitions screen, ...etc), and our app needs to connect to the server to retrieve a response. However, due to an unstable network or other reasons, if the app cannot receive a response within a specific time (around 10 seconds).
While checking the logs above, I noticed that in the code block within dio_interceptors.dart, the jwt
is sometimes null. When we try to access jwt!.jwtToken
, it throws an error: Null check operator used on a null value. This causes the global error handler to catch the error and display the default message: 'Oops! Something went wrong', 'It looks like there’s a small hiccup on our end. We’re on it and should ' 'have things fixed soon. Apologies for any inconvenience!'
class AutonomyAuthInterceptor extends Interceptor {
AutonomyAuthInterceptor();
@override
Future<void> onRequest(
RequestOptions options, RequestInterceptorHandler handler) async {
final shouldIgnoreAuthorizationPath = [
IAPApi.addressAuthenticationPath,
IAPApi.registerPrimaryAddressPath,
];
if (!shouldIgnoreAuthorizationPath.contains(options.path)) {
final jwt = await injector<AuthService>().getAuthToken();
if (jwt == null) {
unawaited(Sentry.captureMessage('JWT is null'));
}
options.headers['Authorization'] = 'Bearer ${jwt!.jwtToken}';
}
return handler.next(options);
}
}
@longbmk Please help to create a bug ticket to track this issue for further investigation by the team.
@anhthuqs99
By the way , we need to handle better these kinds of message. 'Oops! Something went wrong', 'It looks like there’s a small hiccup on our end. We’re on it and should ' 'have things fixed soon. Apologies for any inconvenience!'
Can I get a spreadsheet with all the error messages, what trigger them, and where do they appear? I want to refine globally the feedback we are giving to the user.
@anhthuqs99 This UI is not finalized nor validated but it's to keep track of the progression of things.
I would like to see more broadly all the error messages we are showing up within the app (see my request above and here in Slack to be able to provide a UI that works for all of them.
Question: when the error message is displayed it should be dismissed to be able to continue interacting with the app? I'm asking to see if it's a problem that it's covering the nav-bar.
@Anais-bitmark We are focusing on handling error message, can we use the old design for the pop-up (like image I attached above) & just update the message for this card? Here the list errors message currently appear on our app
@Anais-bitmark we already have this to handle internet connection error, do we need to replace this
this error is fixed in dev, no need to handle error message
[ ] https://github.com/bitmark-inc/au-support-board/issues/2604
[ ] https://github.com/bitmark-inc/au-support-board/issues/2603
[ ] https://github.com/bitmark-inc/au-support-board/issues/2599
[ ] https://github.com/bitmark-inc/au-support-board/issues/2605
[ ] https://github.com/bitmark-inc/au-support-board/issues/2607
[ ] https://github.com/bitmark-inc/au-support-board/issues/2608
[ ] Handle network issue https://github.com/user-attachments/assets/089031d0-3f7d-411c-8ce9-c836d2d824ba https://bitmark-inc.sentry.io/issues/5967577900/?alert_rule_id=12526425&alert_type=issue&environment=production¬ification_uuid=22d63e02-934f-48ea-9763-f165a9ad56f4&project=6088804&referrer=slack
[ ] Error message from Jim https://github.com/bitmark-inc/au-support-board/issues/2614
[ ] https://github.com/bitmark-inc/au-support-board/issues/2612
[ ] https://github.com/bitmark-inc/au-support-board/issues/2611
[ ] https://github.com/bitmark-inc/au-support-board/issues/2610
[ ] Granis curator https://github.com/bitmark-inc/au-support-board/issues/2609
[ ] https://github.com/bitmark-inc/au-support-board/issues/2614