adding support for passing through REST extention errors
added a helper method to throw http errors from a controller