How do I detect that a resource failed to render and take appropriate action? | Community
Skip to main content
Level 2
August 16, 2018
Solved

How do I detect that a resource failed to render and take appropriate action?

  • August 16, 2018
  • 1 reply
  • 1180 views

I have a resource included as follows:

<div data-sly-resource="${ 'resource-name' @ resourceType='path/to/resource'}"></div>

In some cases, that resource is failing to load and no HTMLis being rendered. How can I detected that failure and take action?

Preferably, I'd like to return the response as normal and set an HTTP header.

Thanks for your help!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

Hi,

Check this if helps cq5 - data-sly-resource error handling in sightly - AEM - Stack Overflow

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
August 16, 2018