API errordata is sometimes a string, sometimes a map, sometimes an array... We should standardise this nicely somehow.