You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JCU/Say what actually happened when the REST API reduces a page size (#1448)
The generic wording ends with "This could mean there's an issue with the REST
endpoint", which points at the backend. For a reduced page size that is the wrong
place to look: the API did nothing wrong, the caller asked for a bigger page than
it will serve.
The request for '.../bundles?size=9999' asked for a page of 9999 elements, but
the REST API served 1000. Ask for at most MAX_PAGE_SIZE elements
Anything else keeps the generic message, including a page that came back larger
than requested.
Also drops a stray note from the spec that was left in by #1440.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
return`The request for '${requestedUrl}' asked for a page of ${requestedSize} elements, but the REST API served ${servedSize}. Ask for at most MAX_PAGE_SIZE elements`;
127
+
}
128
+
return`The response for '${requestedUrl}' has the self link '${selfLink}'. These don't match. This could mean there's an issue with the REST endpoint`;
105
129
};
106
130
107
131
@Injectable({providedIn: 'root'})
@@ -210,9 +234,10 @@ export class DspaceRestResponseParsingService implements ResponseParsingService
// the self link is normalized either way, only the warning is filtered
214
-
if(isUnexpectedSelfLink(expected,selfLink)){
215
-
console.warn(`The response for '${urlWithoutEmbedParams}' has the self link '${selfLink}'. These don't match. This could mean there's an issue with the REST endpoint`);
237
+
// the self link is normalized either way, only the warning is conditional
0 commit comments