An air-conditioning apparatus comprising: a circuit formed by connecting, by a pipe , a compressor that compresses refrigerant, a flow switching device , a heat source-side heat exchanger , an expansion unit , a load-side heat exchanger , and an accumulator ; a bypass pipe that connects a position between the heat source-side heat exchanger and the expansion unit , with an upstream side of the accumulator ; a bypass opening and closing device provided to the bypass pipe to control a flow rate of refrigerant flowing in the bypass pipe ; a leakage detection unit that detects refrigerant leakage; and a control unit configured to switch the flow switching device to switch between a cooling operation and a heating operation, the cooling operation being an operation in which the heat source-side heat exchanger acts as a condenser, the heating operation being an operation in which the heat source-side heat exchanger acts as an evaporator, wherein the control unit includes a first controller configured to, in response to detection of refrigerant leakage by the leakage detection unit , switch the flow switching device to connect a discharge side of the compressor with the heat source-side heat exchanger , close the expansion unit , and open the bypass opening and closing device , and a second controller configured to, after operation of the first controller ends, switch the flow switching device to connect the discharge side of the compressor with the load-side heat exchanger , and stop the compressor . a circuit formed by connecting, by a pipe , a compressor that compresses refrigerant, a flow switching device , a heat source-side heat exchanger , an expansion unit , a load-side heat exchanger , and an accumulator ; a bypass pipe that connects a position between the heat source-side heat exchanger and the expansion unit , with an upstream side of the accumulator ; a bypass opening and closing device provided to the bypass pipe to control a flow rate of refrigerant flowing in the bypass pipe ; a leakage detection unit that detects refrigerant leakage; and a control unit configured to switch the flow switching device to switch between a cooling operation and a heating operation, the cooling operation being an operation in which the heat source-side heat exchanger acts as a condenser, the heating operation being an operation in which the heat source-side heat exchanger acts as an evaporator, wherein the control unit includes a first controller configured to, in response to detection of refrigerant leakage by the leakage detection unit , switch the flow switching device to connect a discharge side of the compressor with the heat source-side heat exchanger , close the expansion unit , and open the bypass opening and closing device , and a second controller configured to, after operation of the first controller ends, switch the flow switching device to connect the discharge side of the compressor with the load-side heat exchanger , and stop the compressor . a first controller configured to, in response to detection of refrigerant leakage by the leakage detection unit , switch the flow switching device to connect a discharge side of the compressor with the heat source-side heat exchanger , close the expansion unit , and open the bypass opening and closing device , and a second controller configured to, after operation of the first controller ends, switch the flow switching device to connect the discharge side of the compressor with the load-side heat exchanger , and stop the compressor . <EOS>