enum CreativePreviewError.Reason (v202411)

  • The CreativePreviewError enumeration provides reasons why a creative preview might fail within Google Ad Manager.

  • Errors can arise from issues like the inability to generate a preview URL, specific requirements for native or third-party creatives, or unknown reasons.

  • Developers can use the error reasons, such as CANNOT_GENERATE_PREVIEW_URL or HTML_SNIPPET_REQUIRED_FOR_THIRD_PARTY_CREATIVE, to troubleshoot and resolve creative preview problems.

  • Native creatives require a different method (getPreviewUrlsForNativeStyles) to retrieve preview URLs, as indicated by the CANNOT_GENERATE_PREVIEW_URL_FOR_NATIVE_CREATIVES error.

  • The UNKNOWN error signifies an issue not exposed by the current API version, offering a fallback for unexpected preview failures.


Namespace
https://www.google.com/apis/ads/publisher/v202411
Enumeration Description
CANNOT_GENERATE_PREVIEW_URL The creative cannot be previewed on this page.
CANNOT_GENERATE_PREVIEW_URL_FOR_NATIVE_CREATIVES Preview URLs for native creatives must be retrieved with LineItemCreativeAssociationService.getPreviewUrlsForNativeStyles.
HTML_SNIPPET_REQUIRED_FOR_THIRD_PARTY_CREATIVE Third party creatives must have an html snippet set in order to obtain a preview URL.
UNKNOWN The value returned if the actual value is not exposed by the requested API version.