Hi All,

Agreed with Geeth and Harshan, When it come to the OOB User interface of
EMM the request with an 404 is detect as an error and your is prompted with
an error message since the error handling is handling in a Central
controller witch acts in general so if there are no error occurred in the
sever side best approach not to return status code in 400 - 499 range.

Thanks & Best Regards,

Kamidu Sachith Punchihewa
*Software Engineer*
WSO2, Inc.
lean . enterprise . middleware
Mobile : +94 (0) 770566749 <%2B94%20%280%29%20773%20451194>


Disclaimer: This communication may contain privileged or other confidential
information and is intended exclusively for the addressee/s. If you are not
the intended recipient/s, or believe that you may have received this
communication in error, please reply to the sender indicating that fact and
delete the copy you received and in addition, you should not print, copy,
retransmit, disseminate, or otherwise use the information contained in this
communication. Internet communications cannot be guaranteed to be timely,
secure, error or virus-free. The sender does not accept liability for any
errors or omissions.

On Wed, Jun 15, 2016 at 12:18 AM, Harshan Liyanage <[email protected]> wrote:

> +1
>
> Harshan Liyanage
> Senior Software Engineer
> Mobile: *+94724423048*
> Email: [email protected]
> Blog : http://harshanliyanage.blogspot.com/
> *WSO2, Inc. :** wso2.com <http://wso2.com/>*
> lean.enterprise.middleware.
>
> On Tue, Jun 14, 2016 at 1:42 PM, Geeth Munasinghe <[email protected]> wrote:
>
>> Hi all,
>>
>> I think we should make relevant changes in APIs to send 200 status code
>> for no content responses. This should only be done if the request is with
>> query or form params, but not for request with path parameters (Which is an
>> exact resource, should return 404).
>>
>> Thanks
>> Geeth
>>
>>
>> *G. K. S. Munasinghe*
>> *Senior Software Engineer,*
>> *WSO2, Inc. http://wso2.com <http://wso2.com/> *
>> *lean.enterprise.middleware.*
>>
>> email: [email protected]
>> phone:(+94) 777911226
>>
>> On Tue, Jun 14, 2016 at 11:48 PM, Harshan Liyanage <[email protected]>
>> wrote:
>>
>>> Hi Geeth,
>>>
>>> Agreed. In such cases I guess sending 200 with empty body will be more
>>> appropriate because there are some cases where the server responds with 204
>>> when the service does not return data (i.e in some DELETE, POST requests).
>>>
>>> Thanks,
>>>
>>> Harshan Liyanage
>>> Senior Software Engineer
>>> Mobile: *+94724423048*
>>> Email: [email protected]
>>> Blog : http://harshanliyanage.blogspot.com/
>>> *WSO2, Inc. :** wso2.com <http://wso2.com/>*
>>> lean.enterprise.middleware.
>>>
>>> On Tue, Jun 14, 2016 at 12:42 PM, Geeth Munasinghe <[email protected]>
>>> wrote:
>>>
>>>> Hi Ayyoob
>>>>
>>>> On Tue, Jun 14, 2016 at 11:01 PM, Ayyoob Hamza <[email protected]> wrote:
>>>>
>>>>> Yes I agree with Harshan,
>>>>>
>>>>> It is a question about whether we are looking this as a resource or an
>>>>> endpoint. We should look at the url in the resource context(restful
>>>>> approach) even though it is built on top of http. Therefore IMO we need to
>>>>> think that we are mapping a resource to the url and therefore suitable
>>>>> response would be 404.
>>>>>
>>>>>
>>>> /devices/{device_idenitifier} - this should return 404 if requested for
>>>> non-existence device. I have no argument about it. But my concern is at
>>>> /devices?{query_parameter}. This is different. Actual resource is /devices,
>>>> but it returns no content due to filtering criteria associated with query
>>>> parameters, That is, in my opinion is a valid request which deserves a 200
>>>> or 204 response code.
>>>>
>>>> Thanks
>>>> Geeth
>>>>
>>>>
>>>
>>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to