-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix DBAL exception handling in setValues #37520
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blizzz
requested review from
nickvergessen,
ChristophWurst,
a team,
ArtificialOwl,
icewind1991 and
come-nc
and removed request for
a team
March 31, 2023 13:33
/backport to stable26 |
25 and below are not affected, since it delegates execution the original Doctrine QueryBuilder and does not catch Exceptions. |
Can we have a test if this is still used :) |
definitely, not ticked in the boxes up there yet |
This seems to be a left over after abstracting DBAL. Nowadays, IQueryBuilder::executeStatement() only throws a \OCP\DB\Exception, where previously original DBAL exceptions where thrown. These are now wrapped, the orignal classes are now mapped to a reason. Signed-off-by: Arthur Schiwon <[email protected]>
blizzz
force-pushed
the
fix/noid/fix-dbal-exception-handling
branch
from
March 31, 2023 15:01
d009b5f
to
997c2a2
Compare
Tests added (it's sorta indirect i confess). Without the fix, they would fail with:
|
nickvergessen
approved these changes
Mar 31, 2023
come-nc
approved these changes
Apr 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Might be related to post-close comments in PostgreSQL : duplicate key value violates unique constraint error message #6343Summary
This seems to be a left over after abstracting DBAL. Nowadays, IQueryBuilder::executeStatement() only throws a \OCP\DB\Exception, where previously original DBAL exceptions where thrown. These are now wrapped, the orignal classes are now mapped to a reason.
(This is a by-catch of testing ldap_contacts_backend and wondering/debugging why its occ edit command was failing).
P.S.: There might be more opportunities for adjustment in this file, did not check further.
Checklist
Screenshots before/after for front-end changes