Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-67804

Let clients be able to distinguish different webservice_access_exception

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.8.1
    • Fix Version/s: None
    • Component/s: Web Services
    • Labels:
    • Affected Branches:
      MOODLE_38_STABLE

      Description

      In the app we want to logout the user if he's suspended. The problem is that we cannot distinguish the suspended user exception from other access exceptions since the specific data is only present in the debuginfo. This is because the error uses the websevice_access_exception class.

      If would be nice if Moodle could return a different errorcode, exception or message for each exception so the app can tell which error is happening.

      Example of what the app receives if a suspended user calls a WebService:

      {"exception":"webservice_access_exception","errorcode":"accessexception","message":"Access control exception"}

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jleyva Juan Leyva
              Reporter:
              dpalou Dani Palou
              Participants:
              Component watchers:
              Juan Leyva, Jake Dallimore, Jun Pataleta
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: