Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

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

kramer2718
Level 2
Level 2

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!

1 Accepted Solution
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor
1 Reply
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor