View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006687 | libeufin | libeufin-nexus | public | 2021-01-11 16:50 | 2023-01-08 10:32 |
Reporter | Florian Dold | Assigned To | MS | ||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 0.9.0 | Fixed in Version | 0.9.0 | ||
Summary | 0006687: fetch-accounts crashes with constraint violation on repeated use | ||||
Description | $ libeufin-cli connections download-bank-accounts myconnection => works first time $ libeufin-cli connections download-bank-accounts myconnection => results in error 16:45:18.927 [nioEventLoopGroup-4-3] ERROR tech.libeufin.nexus - org.jetbrains.exposed.exceptions.ExposedSQLException: org.sqlite.SQLiteException: [SQLITE_CONSTRAINT] Abort due to constraint violation (UNIQUE constraint failed: OfferedBankAccounts.offeredAccountId, OfferedBankAccounts.bankConnection) SQL: [INSERT INTO OfferedBankAccounts (bankCode, bankConnection, holderName, iban, imported, offeredAccountId) VALUES (?, ?, ?, ?, ?, ?)] | ||||
Tags | No tags attached. | ||||
|
Yes, every bank connection can store information about a particular bank account only once in the database. While I agree that this is a soft error, I would avoid adding more checks before storing something in the database. Downloading a bank account twice is a rare event, as opposed - for example - to downloading a bank *transaction* twice. |
|
The check should be done as part of the transaction that inserts the offered bank account. There's no reason to let a constraint violation exception happen here. It's bad user experience and might hide other errors. |
|
Also, I wouldn't say that it's uncommon to run this command twice, especially if you're working through the setup howto! |
|
Discussed privately, fixed here: 159225a..1ce76c5 |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-01-11 16:50 | Florian Dold | New Issue | |
2021-01-11 16:50 | Florian Dold | Assigned To | => MS |
2021-01-11 16:50 | Florian Dold | Status | new => assigned |
2021-01-15 11:22 | MS | Note Added: 0017348 | |
2021-01-15 11:58 | Florian Dold | Note Added: 0017350 | |
2021-01-15 11:58 | Florian Dold | Note Added: 0017351 | |
2021-01-15 16:59 | MS | Note Added: 0017354 | |
2021-01-15 16:59 | MS | Status | assigned => resolved |
2021-01-15 16:59 | MS | Resolution | open => fixed |
2023-01-08 10:31 | Christian Grothoff | Fixed in Version | => 0.9.0 |
2023-01-08 10:31 | Christian Grothoff | Target Version | => 0.9.0 |
2023-01-08 10:32 | Christian Grothoff | Status | resolved => closed |
2023-04-13 20:38 | Florian Dold | Category | nexus => libeufin-nexus |