bitmark-inc / feralfile-app

Feral File: the way to collect art
https://app.feralfile.com
Other
43 stars 7 forks source link

[Bug] There are some error message we are still not handle #2181

Open longbmk opened 1 month ago

longbmk commented 1 month ago
anhthuqs99 commented 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).

Image

anhthuqs99 commented 1 month ago

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.

Anais-bitmark commented 1 month ago

@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.

Anais-bitmark commented 1 month ago

@anhthuqs99 This UI is not finalized nor validated but it's to keep track of the progression of things.

Figma

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.

Image

anhthuqs99 commented 1 month ago

@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

phuocbitmark commented 4 weeks ago

@Anais-bitmark we already have this to handle internet connection error, do we need to replace this image

phuocbitmark commented 4 weeks ago

this error is fixed in dev, no need to handle error message