Added Rest interfaces and support for rest error handling