ocs_wove created CAUSEWAY-3661: ---------------------------------- Summary: 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
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)