Wireless Sensor Networks (WSN) have the potential of significantly enhancing our ability to monitor and interact with our physical environment. Realizing a fault-tolerant operation is critical to the success of WSN. The main challenge is providing fault-tolerance (FT) while conserving the limited resources of the network. Our main contribution in this paper is to propose a general framework for fault-tolerance in WSN. The proposed framework can be used to guide the design and development of FT solutions and to evaluate existing ones. We present a comparative study of the existing schemes and identify potential enhancements. A primary module of the framework is the learning and refinement module which enables a FT solution to be adaptive and self-configurable based on changes in the network conditions. We view this as vital to the resource-constrained and highly dynamic WSN. Up to our knowledge, we are the first to propose the implementation of such module in FT solutions for WSN.