client handles exceptions