Added exception handler to the REST configuration.