raise a proper excepetion when getting the resource fails
fix tests
oops, forgot the self