Page MenuHomePhabricator

API action=import doesn't say anything when no revisions are imported
Open, LowPublic

Description

When the API action=import ends up importing no revisions or log entries, the following response is returned:

{
    "import": []
}

It should be a bit more informative.

This response also seems to be returned when the requesting user is blocked.

Event Timeline

TTO raised the priority of this task from to Medium.
TTO updated the task description. (Show Details)
TTO subscribed.
TTO renamed this task from API action=import doesn't report error messages to API action=import doesn't say anything when no revisions are imported.Dec 23 2015, 3:23 AM
TTO lowered the priority of this task from Medium to Low.
TTO updated the task description. (Show Details)
TTO set Security to None.
{
    "import": []
}

It tells you that nothing was imported by returning an empty array for the list of things that were imported. What more is needed, really?

This response also seems to be returned when the requesting user is blocked.

ApiImportReporter isn't doing anything with the reportNotice method. That should be fixed, although to do it well would want improving of ImportReporter::reportNotice to include context (i.e. the Title object or the title-text that was invalid) instead of just being passed a message key and parameters.

ApiImportReporter is also ignoring the importing of log entries, which should probably also be fixed somehow. The web UI's handling doesn't seem that great, though, it just counts how many were seen total without even considering whether any were skipped (invalid title or already imported).