Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-2640

Display full WS error messages on the app

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 3.6.0
    • 3.5.2
    • Error reporting
    • Hide

      To test this issue you need to be able to modify the database of the site and change the code.

      1. In web, login as admin, go to Site administration > Development > Debugging and set "Debug messages" to DEVELOPER.
      2. Create a course and enrol at least 2 users in it.
      3. Now access the site database, go to the user table (usually mdl_user) and add some HTML to the firstname of one of the users from the previous step (e.g. <b>Terry</b>).
      4. In the app, login as the other user (the one that wasn't modified) and go to the course from step 2.
      5. Click "Participants". Check that you see an error message saying that an invalid response was detected, but no details are provided.
      6. Go to the More tab and then to Settings > General. Enable "Display debug messages".
      7. Go back to the Participants and perform a PTR. Check that now the modal displays more details about the error.
      8. Now modify the code of get_signup_settings in auth/email/classes/external.php and add this line:

        throw new Exception('Test');
        

      9. In the app, go to add site and enter the URL of the site you modified the code.
      10. Click to create a new account. Check that you can see the stacktrace in the error modal.
      Show
      To test this issue you need to be able to modify the database of the site and change the code. In web, login as admin, go to Site administration > Development > Debugging and set "Debug messages" to DEVELOPER. Create a course and enrol at least 2 users in it. Now access the site database, go to the user table (usually mdl_user ) and add some HTML to the firstname of one of the users from the previous step (e.g. <b>Terry</b>). In the app, login as the other user (the one that wasn't modified) and go to the course from step 2. Click "Participants". Check that you see an error message saying that an invalid response was detected, but no details are provided. Go to the More tab and then to Settings > General. Enable "Display debug messages". Go back to the Participants and perform a PTR. Check that now the modal displays more details about the error. Now modify the code of  get_signup_settings in auth/email/classes/external.php and add this line: throw new Exception('Test'); In the app, go to add site and enter the URL of the site you modified the code. Click to create a new account. Check that you can see the stacktrace in the error modal.
    • MOODLE_35_STABLE
    • MOODLE_36_STABLE
    • Moodle Mobile 3.6.0

    Description

      We should display the full error message (including the debugginginfo and stacktrace) if it is returned by the WS.

      In order to do not over-complicate the interface, we have two options for doing that:

      • Add a new setting to enable full-descriptive/verbose errors to be displayed
      • Add a "Show more" or "View more" button/link in the error modal

      This will help us a lot when debugging errors reported via forums or the app

      Attachments

        Activity

          People

            dpalou Dani Palou
            jleyva Juan Leyva
            Pau Ferrer Pau Ferrer
            Juan Leyva Juan Leyva
            Albert Gasset Albert Gasset
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Clockify

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.