In a two-way relay network, two terminals exchange information with the help of a relay. Due to its fundamental and practical importance, there has been an increasing interest in this channel. Recently, the notation of bottleneck error exponent has been introduced which is the worst exponent decay between the two links, gives us insight into the fundamental tradeoff between the rate pair and the information-exchange reliability of the two terminals. For its applications to the design of reliable twoway relay networks, we present two optimal resource allocations to maximize the bottleneck error exponent: i) the optimal rate allocation under a sum-rate constraint and its closed-form quasioptimal solution that requires only the knowledge of the capacity and cutoff rate of each link; and ii) the optimal power allocation under a total power constraint of two terminals in the presence of global channel state information, which can be efficiently determined via a sequence of convex feasibility problems in the form of second-order cone programs. Numerical results verify the effectiveness of the optimal rate and power allocations in maximizing the bottleneck error exponent.