API errors converted to array