Skip to content

🐛 Generating Ego API fails in prod #390

@hlminh2000

Description

@hlminh2000

Describe the bug

Can't generate API Key key. This causes the UI to hang:
Screen Shot 2021-04-12 at 2 23 45 PM

Steps To Reproduce

run the following mutation at https://api.platform.icgc-argo.org/graphql, as a public user:

mutation GENERATE_EGO_API_TOKEN {
  generateAccessKey {
    key
    exp
    error
    __typename
  }
}

receives the following error:

{
  "errors": [
    {
      "message": "The 'Policy' entity with name '*' was not found",
      "locations": [],
      "path": [
        "generateAccessKey"
      ],
      "extensions": {
        "timestamp": "2021-04-12T18:22:30.322+0000",
        "status": 404,
        "error": "Not Found",
        "message": "The 'Policy' entity with name '*' was not found",
        "path": "/o/api_key",
        "code": "BAD_USER_INPUT",
        "exception": {
          "timestamp": "2021-04-12T18:22:30.322+0000",
          "status": 404,
          "error": "Not Found",
          "path": "/o/api_key",
          "stacktrace": [
            "UserInputError: The 'Policy' entity with name '*' was not found",
            "    at /appDir/dist/utils/restUtils.js:63:19",
            "    at Generator.next (<anonymous>)",
            "    at fulfilled (/appDir/dist/utils/restUtils.js:23:58)",
            "    at runMicrotasks (<anonymous>)",
            "    at processTicksAndRejections (internal/process/task_queues.js:93:5)"
          ]
        }
      }
    }
  ],
  "data": null
}

Expected behaviour

Should generate a new API key

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingduplicateThis issue or pull request already exists

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions