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

Webservices errors should throw proper http code

    XMLWordPrintable

    Details

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

      Description

      Came up from MDL-55916 - we made the web interface return a 503 when a a site was in maintenance mode. We should do the same in webservices, in fact there are other places where it doesn't seem like we are making use of proper http response codes.

      The code around maintance mode exception even gives a clue:

      //this is usually temporary, client want to implement code logic  => moodle_exception
       throw new moodle_exception('sitemaintenance', 'admin');
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              poltawski Dan Poltawski
              Participants:
              Component watchers:
              Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: