Extract error handling to mixin class for all cases