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

Werner Punz edited comment on MYFACES-4676 at 8/26/24 8:22 PM:
---------------------------------------------------------------

The error handling needs a smaller rework, the empty response and invalid 
response error cases are not cleanly enough covered/handled by the current 
codebase, so I will not be able to fully finalize this tonight!
The current codebase does a validation and throws a normal exception, but the 
new spec handles that within the existing error handling, hence the way/place 
we need to cover this changes!
---
As it seems the error handling code needs a complete overhaul, we still have 2 
different error data structures here. the errors themselves are handled. in two 
places on the request object side if the request bombs out and on the response 
side if the error is coming in as error response xml!

I will clean this up properly and add a bunch of unit tests!

-- 
Also given the code was written under the premise that it should be as readable 
as possible, I only can apologize, I was a little bit sloppy in this area!
Nevertheless this will be cleaned up, already working on it!




was (Author: werpu):
The error handling needs a smaller rework, the empty response and invalid 
response error cases are not cleanly enough covered/handled by the current 
codebase, so I will not be able to fully finalize this tonight!
The current codebase does a validation and throws a normal exception, but the 
new spec handles that within the existing error handling, hence the way/place 
we need to cover this changes!
---
As it seems the error handling code needs a complete overhaul, we still have 2 
different error data structures here. the errors themselves are handled. in two 
places on the request object side if the request bombs out and on the response 
side if the error is coming in as error response xml!

I will clean this up properly and add a bunch of unit tests!


> 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.0-RC3
>
>         Attachments: Screenshot 2024-07-22 153633.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)

Reply via email to