fixed exception handler after exceptions refactor and implemented custom resourceTypes