[MAGNOLIA-6023] Improve exception handling of SessionUtil#getNodeByIdentifier Created: 17/Dec/14  Updated: 23/Jan/15  Resolved: 23/Jan/15

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 5.3.7

Type: Improvement Priority: Neutral
Reporter: Zdenek Skodik Assignee: AntonĂ­n Juran
Resolution: Won't Fix Votes: 0
Labels: support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

Would a user link a content that will be removed later on, an exception like

Exception trying to access node with identifier: '317ac34e-d3e7-4764-8e50-06fdd4fd6063' in workspace: 'website'
javax.jcr.ItemNotFoundException: 317ac34e-d3e7-4764-8e50-06fdd4fd6063

gets logged. For such dead links detection it'd be helpful if a current URI or handle or whatsoever will be accompanied.



 Comments   
Comment by AntonĂ­n Juran [ 23/Jan/15 ]

Since identifier is all you supplied and node was not found there is nothing left to discover what the path could have been for such identifier.
To avoid running into such issue, it would need to be solved at the source - transformer that is responsible for storing identifier would need to include originalPath for created links and whatever is responsible for consuming such links would need to be updated as well to either fallback to path when uuid can't be resolved or to at least include it in the exception. Either way, fix can't be in SessionUtil but elsewhere.

Generated at Mon Feb 12 04:10:35 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.