(bug 66619) API change: error message is a list not a dict

Solve breaking change of gerrit 124323 and keep the old code
part for backward compatibility with older mw releases.

Change-Id: I7dc2c03ce0d84ea2d5c36170998253b4b8fed3ae
Merge "(bug 66619) API change: error message is a list not a dict"