ES exception handling + tests