Added possibility to override Resource's errorHandler