Add ability to cancel an image generation job in progress in case it errors. also there should be a max error retries before it automatically fails.