No matter where on the globe you’re traveling to, there’s a possibility a natural disaster or man-made tragedy could ruin your plans. Maybe you’re staring down a hurricane like this year’s Harvey, Maria, or Irma – or a volcanic eruption like the one supposedly brewing in Bali. Acts of terrorism — shootings, bombings, and the like — are just as likely to affect your trip, or at least make you think twice about traveling.

But, what do you do when one of these tragedies inconveniently falls right in the midst of an upcoming trip? Do you cancel? And if you do cancel, are you deserving of a refund?

The answer is complicated. The financials of canceling or rerouting your trip depend a lot on how you booked and the severity of the tragedy. However, a few general rules of thumb can help you understand the process.

The way you booked your trip matters

First things first. The manner in which you booked and paid for your trip matters a great deal when it comes to who you should contact to cancel and how your situation will be handled.

If you booked a vacation package with a third-party travel booking service like Expedia or Travelocity, for example, you’ll want to contact them right away. If you booked your hotel, flights, and rental car separately, on the other hand, you’ll need to call each individual vendor to explore your options.

Hotels tend to be the most lenient of all travel vendors, especially if you’ve booked through the hotel directly. You may also have some leeway with rooms booked through third-party sites — that is, as long as you didn’t book a non-refundable rate. While all hotels and resorts have their own unique terms and conditions, many let you cancel without penalty up to a few weeks or even a few days before your trip.

Read through your reservation to find the cancellation terms, then cancel quickly if you can. If you’re beyond the cancellation window, calling your hotel’s customer service line can help. In the midst of a natural disaster or an impending one, they may be willing to let you cancel without penalty. Or, they might be willing to shift your reservation to another hotel.

Flights can be a lot trickier, but it depends on your carrier and the specific disaster at hand. Right before Hurricane Irma this year, my husband and I were scheduled to fly into Punta Cana in the Dominican Republic. The hotel told us not to come, but we had trouble canceling our flights. First, American Airlines told us that we wouldn’t get a refund unless the flight was actually canceled. The day before the trip — with a Category 4 hurricane barreling through the Caribbean — they said to show up at the airport. They also said we had the option of changing our flights after paying a $150 change fee per person.

But when I called back the same night, they relented and offered a travel credit good for another trip if we booked within six months. After another call the next day, however, they said they would convert the travel credit into the original form of payment, which was 57,500 American AAdvantage miles for one flight.

The bottom line: Airline policies aren’t always set in stone, and you’re not always entitled to a full refund unless your flight is canceled altogether. So, call your airline early and ask about your options. And if you don’t hear what you want, hang up and…