Page MenuHomePhabricator

Multiple conflicting "outofrange" warnings in API response (rvlimit "must be between 1 and 500" vs "1 and 50")
Open, Needs TriagePublic

Description

Steps to replicate:

Expected output:

  • A single outofrange warning with text "The value \"600\" for parameter \"rvlimit\" must be between 1 and 50."

Actual output:

  • Response contains 2 outofrange warnings:
"warnings": [
       {
           "code": "outofrange",
           "text": "The value \"600\" for parameter \"rvlimit\" must be between 1 and 500.",
           "data": {
               "min": 1,
               "curmax": 500,
               "max": 500,
               "highmax": 5000
           },
           "module": "query+revisions"
       },
       {
           "code": "outofrange",
           "text": "The value \"500\" for parameter \"rvlimit\" must be between 1 and 50.",
           "data": {
               "min": 1,
               "curmax": 50,
               "max": 50,
               "highmax": 500
           },
           "module": "query+revisions"
       }
   ]

With the default legacy errorformat, there is a single warning with confusing text instead:

"warnings": "The value \"600\" for parameter \"rvlimit\" must be between 1 and 500.\nThe value \"500\" for parameter \"rvlimit\" must be between 1 and 50."

This appears to be because ApiQueryRevisions has a limit of 500, but it's reduced to 50 when rvprop=content is enabled.

Event Timeline

Aklapper renamed this task from Multiple outofrange warnings in API response to Multiple conflicting "outofrange" warnings in API response (rvlimit "must be between 1 and 500" vs "1 and 50").Feb 13 2021, 12:52 AM