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

Gareth Carter commented on OFBIZ-5409:
--------------------------------------

The list of attributes was bad practise on my part, I noticed ofbiz returning 
these attributes whilst testing returning 500 status code and was testing 
ignoring them and should have implemented it properly (and separately).

On reflection, I think you're right about the status code, always return 200 
except for exceptions and client errors aswell. I was trying to remove any 
duplicate error handling from Javascript side by having a single error 
function, is this something that could be integrated into ofbiz?

Jacques, I ignored all attributes that were returned on a specific request, 
most likely those ones are for all requests and will be incomplete. My opinion, 
it should only return the result from a web service, all other attributes 
should be ignored as there is no guarantee what can be returned. 

> JSON Response does not set http status on error
> -----------------------------------------------
>
>                 Key: OFBIZ-5409
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5409
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ALL APPLICATIONS
>    Affects Versions: SVN trunk
>            Reporter: Gareth Carter
>            Priority: Trivial
>         Attachments: CommonEvents.patch
>
>
> When a json response is sent and there was an error in the service called, it 
> does not set the http status. Currently status code is always 200 but it 
> might be more appropriate to send an error code such as 500.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to