Skip to content
This repository has been archived by the owner on Oct 31, 2021. It is now read-only.

jobs: failed to retrieve access token for plaid link: pg: no rows in result set #249

Open
sentry-io bot opened this issue Jul 19, 2021 · 1 comment
Assignees
Labels
bug Something isn't working Job Processing Anything related to scheduled work done in the background. Links Plaid

Comments

@sentry-io
Copy link

sentry-io bot commented Jul 19, 2021

Sentry Issue: REST-API-1A

internal.Error: pg: no rows in result set
*errors.withMessage: failed to retrieve access token for plaid link: pg: no rows in result set
*errors.withStack: failed to retrieve access token for plaid link: pg: no rows in result set
  File "/build/pkg/secrets/postgres.go", line 61, in (*postgresPlaidSecretProvider).GetAccessTokenForPlaidLinkId
  File "/build/pkg/jobs/pull_latest_transactions.go", line 141, in (*jobManagerBase).pullLatestTransactions.func2
  File "/build/pkg/jobs/jobs.go", line 205, in (*jobManagerBase).getRepositoryForJob.func1
  File "/go/pkg/mod/github.com/go-pg/pg/v10@v10.10.2/tx.go", line 95, in (*Tx).RunInTransaction
  File "/go/pkg/mod/github.com/go-pg/pg/v10@v10.10.2/tx.go", line 74, in (*baseDB).RunInTransaction
...
(8 additional frame(s) were not displayed)

This is failing poorly due to some links not having access tokens. As to why they do not have access tokens I do not know. But graceful handling of this error should be added, as well as a way to potentially mark links that do not have access tokens as "orphaned" to prevent the error from occurring forever.

@elliotcourant elliotcourant added bug Something isn't working Job Processing Anything related to scheduled work done in the background. Links Plaid labels Jul 19, 2021
@elliotcourant
Copy link
Member

This is now handled a bit better, but maybe some improvements should be made around this to help track it if it starts happening again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Job Processing Anything related to scheduled work done in the background. Links Plaid
Projects
None yet
Development

No branches or pull requests

1 participant