log errors in REST