python requests exception get status code