Skip to content
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

Open does not throw NotFound error when used with neon.tech #160

Open
TimoGlastra opened this issue Jul 28, 2023 · 2 comments
Open

Open does not throw NotFound error when used with neon.tech #160

TimoGlastra opened this issue Jul 28, 2023 · 2 comments

Comments

@TimoGlastra
Copy link
Member

Maybe this is a neon.tech issue, but the open method in the postgresql provision.rs, checks whether the error code is 3D000 (invalid catalog name) and then assumes the database does not exist. However neon.tech will throw an error XX000 (internal error), with the message database "my-wallet4" does not exist. This means the normal flow will fail.

Is there something we can do to still treat this as "NotFound"?

@berendsliedrecht
Copy link
Contributor

Hmm it seems to be an neon.tech issue as they are using the incorrect error code for a db not found.

relevant snippet:

https://github.com/neondatabase/neon/blob/67d2fa6dec41af962655198b13f9f8f3a7dc6ef4/libs/postgres_backend/src/lib.rs#L48

So the best thing would be for neon.tech to throw the correct error code for this message and not change anything in Askar as I think that this is the correct way to deal with this issue.

@andrewwhitehead
Copy link
Member

I don't think there's an issue for this in the neon database repo is there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants