-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix: handle queries on non-existing table gracefully #3869
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: handle queries on non-existing table gracefully #3869
Conversation
95d4973
to
52591c0
Compare
Now that we rely on the schema cache for simple table filters, we need to make sure these requests are fast when a schema cache load for relationships is slow (#3046). There's a test that validates the above behavior (a request with resource embedding is blocked until the schema cache finishes loading): postgrest/test/io/test_big_schema.py Lines 10 to 34 in 52591c0
We need an additional test that asserts that a table request (with no resource embedding) finishes in a short |
f008e21
to
bdaf6bf
Compare
One last concern, we are still using
postgrest/src/PostgREST/Error.hs Line 135 in e2dd435
This seems fine for now, but maybe should be improved later (add error msg, details etc) for better UX? |
8d6bb71
to
bb4f692
Compare
bb4f692
to
7196aa5
Compare
@steve-chavez Could this get a review? Seems good to me. |
7196aa5
to
0b52035
Compare
2b80a7c
to
06532d2
Compare
06532d2
to
249b405
Compare
I tried to backport this, but it doesn't apply cleanly, probably needs some of the refactors before that. So won't backport. |
I don't think this should be backported anyways as discussed in #3869 (comment). |
Add new
TableNotFound
error and add json errormessage for this error. Closes #3697, closes #3602.
(Couldn't think of a better changelog/commit message. Feel free to suggest a new/better message).