refactor provider exceptions