UnexpectedForeignConnectionError as optional warning #669
maybephilipp
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone!
I was really happy to see UnexpectedForeignConnectionError in the new version, but now I see a production error in my code and I actually need to disable this only for few queries.
My scenario: I'm doing some stuff related to user, for ex., sign up, and then I notice that an user violated some rule, it this case I need to add a warning on his account, but rest of the transaction should rollback. So what I do now is that I use transaction for changing the user and
pool
for violation warnings inserts as they shouldn't be part of safe transaction - I want to know about these warning on user whatever happens.But if I use
dangerouslyAllowForeignConnections
, then I have this convenient feature disabled for the whole project.I would suggest implementing a warning (in case I have
dangerouslyAllowForeignConnections
we still see warnings) or an option on particular query so there is more granularity.Beta Was this translation helpful? Give feedback.
All reactions