fixing rest error handling on server and client