Repository navigation
fix(adapter-pg): Add handling of socket and TLS level errors - #27682
Conversation
|
failing e2e is because this will need an update in prisma-engines to handle the DriverAdapterError mappings. I guess |
|
Hi @barryhagan, this change requires a minor adjustment in prisma-engines, the new variants need to be added to this data type: After the prisma-engines change is ready you can run the tests against the prisma-engines branch by adding |
537e5a6 to
a557656
Compare
|
You may have a bigger issue at hand with your CI job and e2e tests. The use of a custom engine branch is not obeyed when running e2e tests in docker containers. The PRISMA_QUERY_ENGINE_BINARY env var is not supplied and it doesn't look like you add a volume to mount So this e2e test will fail until the engine PR is merged. I added version output to the failing test to prove that even though the custom branch from my pull was built (bff345156758e55d5c51d6eaf300c3714808f13b), the e2e test is still using the default resolved engine (0b2e493791181e99e767ee7c566626d82da01481) |
Ouch, yeah, you are right, very good catch. I think you could make this test pass in the PR by switching it to use |
Support needed for prisma/orm#27682 Mapping these to RawConnectorError, because the other paths through NativeErrorKind were going to be ugly. Selfishly, this is really only to improve the behavior of queryCompiler + driverAdapters.
cdf7ef3 to
785d8ec
Compare
Add the missing mappings from adapter-pg to Prisma errors P1001, P1011, and P1017.
This doesn't completely resolve #27626, but it makes the error codes on queries correct for connection level issues.