8000 Implement gracefall fallback if curator_self authorization fails · Issue #471 · wcmc-its/ReCiter-Publication-Manager · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Implement gracefall fallback if curator_self authorization fails #471
Open
@paulalbert1

Description

@paulalbert1

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.

Screenshot 2023-10-16 at 2 34 48 PM

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'
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0