You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Thomas Smith (Jira)" <de...@myfaces.apache.org> on 2024/07/22 19:42:00 UTC

[jira] [Comment Edited] (MYFACES-4676) Error Data Paylod Not Following Spec in Faces 4.0

    [ https://issues.apache.org/jira/browse/MYFACES-4676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17867858#comment-17867858 ] 

Thomas Smith edited comment on MYFACES-4676 at 7/22/24 7:41 PM:
----------------------------------------------------------------

Melloware that's just a custom error handler that receives the payload in the screenshot and adds parts of it to an error page on an Ajax error.

Looks similar to the following:
{code:java}
faces.ajax.addOnError(function (errorData) {
console.log(errorData.status);
console.log(errorData.responseText);
/// ....etc
} {code}


was (Author: JIRAUSER305866):
Melloware that's just a custom error handler that receives the payload in the screenshot and adds parts of it to an error page.

> 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
>         Environment: Windows 11
>            Reporter: Thomas Smith
>            Priority: Trivial
>         Attachments: Screenshot 2024-07-22 153633.png, Screenshot 2024-07-22 at 1.55.47 PM.png
>
>   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)