When a 40x error occurs when trying to deliver a derived asset of an asset, that error is cached at our CDN, and repeated requests to the same URL will increase the time of that cache in an exponential back-off manner (If the reason for the error has not been resolved).
For example, if you try to access a derived version of an asset that hasn't yet been uploaded to your account, the system returns a 404 error for that URL and that 404 error is cached, first for 1 minute, and if the error occurs again after the cache expires, the next error for the same URL is cached for twice the previous cache time. The error cache can reach a maximum 24-hour cache period in the case of repeated requests to the same failing URL, and further errors will extend the error cache by 24 hours.
If you resolve the reason for the error (such as by uploading the missing file for 404 errors) and a URL for a derived version of the asset was cached as an error, you'll still receive a cached error on that URL until the cache expires. However, URLs for other derived versions of the same asset will return a successful response (if they weren't cached, the request reaches our servers and the request succeeds).
The best way to resolve this case is to ensure that the original asset is fully uploaded to your Cloudinary account before attempting to access any derived versions of that asset image using transformations.
As a short-term workaround, you can start using the asset's version number in the URL after it's been uploaded, or use different transformation options temporarily to bypass the cache: https://support.cloudinary.com/hc/en-us/articles/202520912-What-are-image-versions-
Depending on your requirements, you may also be able to use our default image placeholder transformation, which allows you to return a temporary placeholder image when a 404 error occurs: https://cloudinary.com/documentation/advanced_url_delivery_options#using_a_default_image_placeholder