Construct the url in the try / except block