Changed exception handling to pass in the response exception