Skip to content

integrationkey: unexpected error returned for non-existent key in GraphQL #1709

@dctalbot

Description

@dctalbot

Describe the Bug:
the integrationKey query returns an unexpected error and a SQL NoRows error is logged when an ID is provided that does not exist.

Steps to Reproduce:

  1. Create an integration key
  2. Save new integration key's ID
  3. Delete said integration key
  4. Go to /api/graphql/explore
  5. Execute this query, substituting in the saved ID value
query{
  integrationKey(id:"<ID-VALUE-HERE>"){
    id
  }
}

Expected Response:

{
  "data": {
    "integrationKey": null
  }
}

Observed Response:

{
  "errors": [
    {
      "message": "unexpected error",
      "path": [
        "integrationKey"
      ]
    }
  ],
  "data": {
    "integrationKey": null
  }
}

Application Version:
a5231c2c7f3482ed6578c24ea900b6e36e847ad8

Metadata

Metadata

Assignees

No one assigned

    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