move error handling to resource owner