Investigation endpoint with invalid sessionId
For endpoints:
/catalogue/{sessionId}/investigation/name/{investigationName}/instrument/name/{instrumentName}?time={time}
/catalogue/{sessionId}/investigation?
if the sessionId is expired or incorrect, http error is not returned.
Error in icat log:
2021-09-01T12:35:33.214Z [error]: Unable to initialize the user'session ,
sessionId : df1939dd-72cd-4868-af87-be3a8360e6d4,
error : Request failed with status code 403,
,
2021-09-01T12:35:33.214Z [warn]: No session retrieved ,
,
(node:25) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'isAdministrator' of undefined,
at exports.allowAdministrators (/icat/app/authentication/icat.js:42:15),
at runMicrotasks (<anonymous>),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
(node:25) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2335),
2021-09-01T12:37:54.816Z [error]: Unable to initialize the user'session ,
sessionId : df1939dd-72cd-4868-af87-be3a8360e6d4,
error : Request failed with status code 403,
,
2021-09-01T12:37:54.816Z [warn]: No session retrieved ,
,
(node:25) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property `name` of 'undefined' or 'null'.,
at exports.requiresSession (/icat/app/authentication/icat.js:250:9),
at runMicrotasks (<anonymous>),
at processTicksAndRejections (internal/process/task_queues.js:94:5),
(node:25) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2340)
Edited by Marjolaine Bodin