You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@causeway.apache.org by "Daniel Keir Haywood (Jira)" <ji...@apache.org> on 2024/03/12 12:25:00 UTC

[jira] [Reopened] (CAUSEWAY-3661) REST call for collection can return 404 error

     [ https://issues.apache.org/jira/browse/CAUSEWAY-3661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Keir Haywood reopened CAUSEWAY-3661:
-------------------------------------------

> REST call for collection can return 404 error
> ---------------------------------------------
>
>                 Key: CAUSEWAY-3661
>                 URL: https://issues.apache.org/jira/browse/CAUSEWAY-3661
>             Project: Causeway
>          Issue Type: Improvement
>          Components: Viewer RO
>    Affects Versions: 2.0.0-RC3
>            Reporter: ocs_wove
>            Assignee: Daniel Keir Haywood
>            Priority: Major
>              Labels: newbie
>             Fix For: 2.0.0
>
>
> When doing a REST call for finding values and expecting a collection of objects back there is an inconsistency with Causeway (2.x) vs Isis (1.x).
> When querying for a value that returns an empty list:
> For 1.x the result is an empty collection.
> For 2.x the result is a http 404 error.
> It's a matter of what to return for an empty collection versus an empty object.
> The functionality for this is located at:
> ContentNegotiationServiceXRoDomainType#buildResponse
>  
> Possible solutions may be:
>  * Don't change anything, the REST client should handle this
>  * Add logic that checks the return type and returns an empty collection in the ContentNegotiationServiceXRoDomainType#buildResponse method
>  * Add logic that checks and returns an empty collection in the 
> _ManagedObjectEmpty#getPojo method
>  * Create a _ManagedCollectionEmpty or
> _ManagedListEmpty object for wrapping the return value of an empty Collection
>  * None of the above



--
This message was sent by Atlassian Jira
(v8.20.10#820010)