Welcome to AFF
davocns
AFAIK it is the airline's responsibility to return you whence you came. That is why check in is supposed to be vigilant on documentation.
I'm not sure if that is also the case if, for example, you have valid entry documentation as a tourist but denied entry as they are convinced you are on business purposes (or another example that your passport has been tampered with). I hope I never find out personally.