- Issue created by @eduardo morales alberti
- 🇪🇸Spain eduardo morales alberti Spain, 🇪🇺
After talking with @tunic and @lpeidro we decided that this fits better on the submodule insights.
It will try to extract the error related or hook to the fetcher resource. - Merge request !74Issue #3482085 by eduardo morales alberti: List medias that could not be retrieve → (Open) created by eduardo morales alberti
- 🇪🇸Spain eduardo morales alberti Spain, 🇪🇺
Ready to review https://git.drupalcode.org/project/xray_audit/-/merge_requests/74#note_4...
The strategy was to create a decorator that registers when a resource gives an exception, it saves on a xray_audit_insight table with the message and the url.
https://git.drupalcode.org/project/xray_audit/-/merge_requests/74/diffs#...
public function fetchResource($url) { try { return $this->resourceFetcher->fetchResource($url); } catch (ResourceException $e) { // Log the exception to the xray_audit_insight table. $this->insightReport->addInsightData( 'external_resource', $e->getMessage(), $url ); throw $e; } }
We also created a External Resources task on Content Display group.
If the module insight is enabled then it shows the resources that needs to be reviewed.
Also, if there there are resources to be reviewed it shows it on the status report:
- 🇪🇸Spain tunic Madrid
Thanks, it looks good to me!
I would prefer to wait for comments from @lpeidro before committing this forward but I think it is ok to move it to RTBC.