[ https://issues.apache.org/jira/browse/MYFACES-4676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17900107#comment-17900107 ]
Werner Punz edited comment on MYFACES-4676 at 12/6/24 3:48 PM: --------------------------------------------------------------- The issue was a misinterpretation of the spec from my side... the source element causing the error is supposed to be passed as is, i basically passes the id. I now remap this back top the source element if still existing (which should be in the case of an error! I will issue merge requests for the affected branches tomorrow on this issue! In my local test scenario both tcks work fine now after fixing it! In my fix, now the element is passed but if no element can be found (which should not happen) then the identifier is passed! That way the TCK is fulfilled but we still get the additional safety net of being able to pass the identifier instead of it getting lost if something page wrecking happens before! You basically can can get the id following way in a safe manner: errorData.source?.id ?? errorData.source (typescript code) was (Author: werpu): The issue was a misinterpretation of the spec from my side... the source element causing the error is supposed to be passed as is, i basically passe the id. I now remap this back top the source element if still existing (which should be in the case of an error! I will issue merge requests for the affected branches tomorrow on this issue! In my local test scenario both tcks work fine now after fixing it! In my fix, now the element is passed but if no element can be found (which should not happen) then the identifier is passed! That way the TCK is fulfilled but we still get the additional safety net of being able to pass the identifier instead of it getting lost if something page wrecking happens before! You basically can can get the id following way in a safe manner: errorData.source?.id ?? errorData.source (typescript code) > Error Data Paylod Not Following Spec in Faces 4.0 > ------------------------------------------------- > > Key: MYFACES-4676 > URL: https://issues.apache.org/jira/browse/MYFACES-4676 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-314 > Affects Versions: 4.0.0, 4.1.0-RC2 > Reporter: Thomas Smith > Assignee: Werner Punz > Priority: Trivial > Fix For: 5.0.0, 4.0.3, 4.1.1 > > Attachments: Screenshot 2024-07-22 153633.png, test-faces22-ajax.war > > Original Estimate: 1h > Remaining Estimate: 1h > > The [Error Data Payload (Table 16)|#a6973]] outlined in the spec isn't > followed. As seen in the screenshot below something seems to be going wrong > for responseText, responseCode, and status. Additionally, description and > responseXML aren't included in the payload. > !Screenshot 2024-07-22 153633.png|width=541,height=408! > The response from the server still seems to be accurate: > {code:java} > <?xml version="1.0" > encoding="UTF-8"?><partial-response><error><error-name>org.apache.myfaces.view.facelets.el.ContextAwarePropertyNotFoundException</error-name><error-message><![CDATA[jakarta.el.PropertyNotFoundException: > Target Unreachable, identifier [testCode] resolved to > null]]></error-message></error></partial-response>{code} > The information seems to be lost somewhere in between the server response and > error payload generation. > -- This message was sent by Atlassian Jira (v8.20.10#820010)