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

Getting a "database not registered" issue even though I can connect to the database #590

Closed
Tracked by #601
timuckun opened this issue Aug 29, 2021 · 1 comment · Fixed by #602
Closed
Tracked by #601
Labels

Comments

@timuckun
Copy link

I have set up a docker compose entry for prest and connected to the database using the PGREST_PG_URL environment variable with ssl disabled.

I then followed the instructions to set up a user and log in as that user. When do http://localhost:3000/tables I see that the view I want to serve is there.

}
schema: "api",
name: "company_announcements",
type: "view",
owner: "postgres"
}

When I go to select from that view I do a

GET http://127.0.0.1:3000/dbname/api/company_announcements
Accept: application/json
Authorization: Bearer XXXXXXXX

I get the following error

HTTP/1.1 400 Bad Request
Content-Type: application/json
X-Content-Type-Options: nosniff
Date: Sun, 29 Aug 2021 13:04:55 GMT
Content-Length: 44
Connection: close

{
"error": "database not registered: dbname"
}

The app can clearly connect to the database in order to list the tables and to log me in why is it giving me this error when I attempt to pull data?

@avelino
Copy link
Member

avelino commented Sep 1, 2021

Share here you create table and how the local prest is running, via docker, binary and which environment variables or toml

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

Successfully merging a pull request may close this issue.

2 participants