Gpt 4O failed while asked to generate images

Asked chatgpt to create context with images and exception was coming
Exception handling is not proper and is exposing the code