European Union's 27 nation bloc remains divided between far right members and the liberal leftists on managing the European Migrant Crisis that began in 2014. The European Migrant Crisis is actually a Middle Eastern and African migrant crisis, because asylum seekers are primarily from conflict ridden areas of Africa & Middle East. As per 2015 UN report, when the crisis was at its peak the top 3 nationalities of asylum seekers hailed from Syria, Iraq & Afghanistan, while remaining belong to other countries like Libya, Somalia, Yemen and African countries impacted by wars that are legacies of several years of direct and indirect Western military and political interventions.
Despite Western countries having most economic and political power and influence in the world they have failed to manage a crisis of thousands of refugees. Why is that? Shada Islam, a Brussel based commentator on EU affairs says that the main obstacles in solving the migrant crisis dividing the the union are in fact pride and prejudice, anti-Muslim sentiment, racism ripe among EU's members, including their post colonial relationship with African and Eastern countries. She claims that such obstacles conflict with Europe's claim of democracy, human rights and the rule of law. The lack of moral leadership in EU is what prevents it from unanimous agreement in resolution of this crisis.
While Western leaders struggles to cope with African and Muslim migrants due to an inherent racism crisis of its own, there is an opportunity for them to learn from a similar crisis that their continent experienced a couple of times in the modern history. But during those crisis the host territory was not a Western state and the asylum seekers were also not from Middle East or Africa. In fact during those crisis the host was Ottoman Islamic empire and the refugees were white, non-Muslim Europeans, seeking asylum in its territory. The facilitation provided by an Ottoman Sultan to these white refugees during their asylum is certainly an important historical lesson that today's West can learn from.
During the 1848 revolutions of Europe, thousands of Polish and Hungarian refugees sought refuge in Ottoman Empire. In the aftermath of war between the Hungarian revolutionaries and the Austrian King backed by Russia, the Hungarians were defeated and many fled to seek refuge in the Ottoman territories which culminated in to a refugee crisis in Ottoman empire. Russia insisted that the Ottomans hand over the refugees and threatened the Sublime Porte (Ottoman Caliphate) by war. Despite such international pressure Resid Pasha, a renown Ottoman stateman of the time, declined to expel the refugees from the empire and his determination even received appreciation from Britain and France.
A few years before the Hungarian uprising, an earlier wave of Polish refugees arrived in the Ottoman Empire, after the failed Polish uprising against Russian rule of 1830–31. Paulina Dominik's review of Polish migrants in to Ottoman territory informs us of a settlement for Polish refugees named Adampol existed in the Empire, named after its founder, Prince Adam Czartoryski, a Polish diplomat and statesman. The village was also referred to by its popular Turkish name Polonezköy (Polish village). In fact after the Crimean War (1853 - 1856), Poles were the most numerously represented group of Europeans in Istanbul— after the French and the Italians. Polish memoirs bear witness to how much freedom their community enjoyed in the Ottoman land. General Marian Langiewicz (1827–1887), himself a Polish refugee states in one of his letters to a friend in London: “Here in Turkey we enjoy the greatest freedom that a political emigrant can have and at the same time we have access to everything. We are valued here as useful and superior beings.” It is said that the Poles were active in almost all social life of the Ottoman society. They served in the profession of engineers, doctors, businessmen, soldiers etc. The Poles even enjoyed gatherings in cafes and clubs to discuss their current political situation, where their fellow Poles gave lectures on a variety of topics and read out Polish patriotic poetry, without having any fear of discrimination towards them by local Turk and Muslim populace.
During 18th century, Europeans escaping religious persecutions also sought refuge in the Ottoman territory. When Peter the Great, Russian Tsar, enforced religious reforms throughout the Russian empire, a strong opposition from the conservative and practicing Christians led towards the Bulavin Rebellion. One of the reforms was the shaving of beards resisted by thousands of practicing Cossacks who ended up finding asylum in Ottoman empire and were settled in Balıkesir's district of Manyas and 2 other districts. Following the 19th century Bolshevik Revolution, the Tsarist supporters lost their battles against the Bolsheviks, thousands of white Russian emigrants sailed in 126 ships to settle in Turkish territory. 
Not only do we find Ottoman's welcoming European refugees with open arms in the 19th & 18th century, in fact the empire was famous for hosting them even during its peak in early 15th century. In July 1492, the new state of Spain expelled its Jewish and Muslim populations as part of the Spanish Inquisition. Sultan Bayezid II sent out the Ottoman Navy under the command of admiral Kemal Reis to Spain in order to evacuate them safely to Ottoman lands. He sent out proclamations throughout the empire that the refugees were to be welcomed. He granted the refugees the permission to settle in the Ottoman Empire and become Ottoman citizens. He ridiculed the conduct of Ferdinand II of Aragon and Isabella I of Castile in expelling a class of people so useful to their subjects. "You venture to call Ferdinand a wise ruler," he said to his courtiers, "he who has impoverished his own country and enriched mine!" Majority of these European Jewish migrants settled in Izmir, Istanbul, and Salonika. By the end of 16th century Salonika became known as "Jerusalem of the East", with several synagogues, well established businesses and Jews being the majority population.
With such historical references of migrant waves that made their way and settled in to the Ottoman empire we do not hear of of any refugees being victims of racism of any sort, be that from the general Muslim public, the Ottoman ruling class or the intelligentsia as commonly faced by African and Eastern refugees in today's Western countries. There is no record of attacks against those European refugees by individuals who follow Turkish supremacist ideologies as found active among the Whites in the Western Europe. We also do not hear of any Turkish organization, who also enjoys support and backing by members of the ruling or political class, whose ideology claims "all non-Turks should leave their lands". We do not hear of any Turk attackers going around committing hate crimes against individual Europeans or their Churches & Synagogues, to spread fear among them. We also do not find record of Ottoman print media of that time consistently and systematically spreading lies and disinformation among the general public that European refugees had some hidden extremist mindset among them which they need to be wary of. The Ottoman Sultan or his Statesmen never threatened a ban on refugees appearing at their borders similar to a Muslim ban recently applied by an Islamophobic US President, and neither did they ever ridicule the religious beliefs and practices of these asylum seekers as is commonly done by narrow minded leaders of UK & France.
Such negative trends are found very active in Western countries like Britain, France, Germany or Netherlands etc. and they tend to deliberately create mistrust between the general masses and the refugees. This sort of behavior adds to the problems already faced by these asylum seekers displaced thousands of miles away from their homes. Despite claiming to be champions of human rights, Western countries have failed to live up to their claims. Nevertheless as Europe's migrant crisis becomes unmanageable they can still learn from the history of a European power that gave protection to refugees and made them truly felt like this was their own home.
 Data as per Operational Data Portal (ODP), United Nations High Commissioner for Refugees
 Europe's migration 'crisis' isn't about numbers. It's about prejudice, The Guardian,
Thu 8 Oct 2020 08.55 EDT
 Encyclopedia of the OTTOMAN empire - Gabor Agoston Georgetown University, Washington, D.C. Bruce Masters Wesleyan University, Connecticut
 From the Polish Times of Pera, Late Ottoman Istanbul through the Lens of Polish emigration, Paulina Dominik,
 The Ottoman Empire: A shelter for all kinds of refugees, BY Ekrem Bugra Ekinci, MAY 16, 2015, Daily Sabah
 Bayezid II
 Agoston & Masters, Encyclopedia of the OTTOMAN empire