Returning the correct http status in case of unhandled exception