Open
Description
A user was trying to login to Publication Manager. She had roles of 3 and 4 in admin_users_roles
(curator_self and reporter_all
).
Of these, the curator_self
role was wrong apparently. The user was in the person
table but not the person_article
table.
I'm not sure why this happened. In any case, we shouldn't prevent such users from logging in, in cases where a user has another role like reporter_all
. I suggest that in these cases, instead of showing an error page, we gracefully direct properly authenticated users to the "Find People" page.
Here's the error in the logs:
ReCiter Update Goldstandard api is not reachable: FetchError: invalid json response body at https://reciter.weill.cornell.edu/reciter/goldstandard?goldStandardUpdateFlag=UPDATE reason: Unexpected token < in JSON at position 0
RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined
at ServerResponse.writeHead (_http_server.js:255:11)
at ServerResponse.writeHead (/app/node_modules/next/dist/compiled/compression/index.js:46:263)
at ServerResponse._implicitHeader (_http_server.js:246:8)
at ServerResponse.end (/app/node_modules/next/dist/compiled/compression/index.js:22:749)
at ServerResponse.apiRes.end (/app/node_modules/next/dist/server/api-utils/node.js:346:25)
at sendData (/app/node_modules/next/dist/server/api-utils/node.js:187:9)
at ServerResponse.apiRes.send (/app/node_modules/next/dist/server/api-utils/node.js:349:31)
at handler (/app/.next/server/pages/api/reciter/update/goldstandard.js:88:52)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:366:9)
at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:481:9)
at async Object.fn (/app/node_modules/next/dist/server/next-server.js:741:37)
at async Router.execute (/app/node_modules/next/dist/server/router.js:252:36)
at async NextNodeServer.run (/app/node_modules/next/dist/server/base-server.js:365:29)
at async NextNodeServer.handleRequest (/app/node_modules/next/dist/server/base-server.js:303:20) {
code: 'ERR_HTTP_INVALID_STATUS_CODE'
}