[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: querying non-existing cartridge is not erroring?




> On Jan 29, 2014, at 10:13 AM, André Dietisheim <adietish redhat com> wrote:
> 
>> On 01/29/2014 04:09 PM, Clayton Coleman wrote:
>> We shouldn't change legacy behavior though - cartridges/:id should behave like old code, but cartridge/:id should behave like new, and if we need a search behavior we should use a different attribute (like name, since carts don't have public ids today).  Did cartridges/:id change for old clients in a breaking way?
> 
> for openshift-java-client there's no breakage since this was not implemented before (I got this via a new patch I was verifying and writing tests for).

We really shouldn't change that old behavior - I have some changes landing soon that restore the old behavior and add ?name= prefix search under /cartridges.

> 
>> 
>>> On Jan 29, 2014, at 10:01 AM, Jordan Liggitt <jliggitt redhat com> wrote:
>>> 
>>> Typically, when using a filter which can return multiple results (e.g. https://openshift.redhat.com/broker/rest/cartridges.json?id=nodejs), an empty result set is expected rather than a 404.
>>> 
>>> 
>>> 
>>> 
>>>> On 01/29/2014 09:51 AM, André Dietisheim wrote:
>>>> Hi LIli, hi all
>>>> 
>>>> I was writing tests for the new query to get infos about a cartridge. I stumbled upon the following: When I do
>>>> 
>>>> curl -H "Accept: application/json; version=1.2" --user adietish redhat com:1q5T9o3E$ https://openshift.redhat.com/broker/rest/cartridges?id=bogus -X GET | json_reformat
>>>> 
>>>> I dont get 404 as I had expected but the following:
>>>> 
>>>> {
>>>>    "api_version": 1.2,
>>>>    "data": [
>>>> 
>>>>    ],
>>>>    "messages": [
>>>>        {
>>>>            "exit_code": 0,
>>>>            "field": null,
>>>>            "index": null,
>>>>            "severity": "info",
>>>>            "text": "List bogus cartridges"
>>>>        }
>>>>    ],
>>>>    "status": "ok",
>>>>    "supported_api_versions": [
>>>>        1.0,
>>>>        1.1,
>>>>        1.2,
>>>>        1.3,
>>>>        1.4,
>>>>        1.5,
>>>>        1.6
>>>>    ],
>>>>    "type": "cartridges",
>>>>    "version": "1.2"
>>>> }
>>>> 
>>>> Is this expected or a bug as I tend to think? If this is a bug, was this filed or should I?
>>>> 
>>>> Thanks
>>>> André
>>>> 
>>>> _______________________________________________
>>>> dev mailing list
>>>> dev lists openshift redhat com
>>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>>> _______________________________________________
>>> dev mailing list
>>> dev lists openshift redhat com
>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]