You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I was looking through the mikro-orm docs and noticed that they say you can pass in the connection string as 'clientUrl' inside mikroOrmConfig.
So I set that up thinking I could get rid of the custom url parsing script:
However, when I ran a simple query to list all organizations, I got this error :
{
"errors": [
{
"extensions": {
"code": "INTERNAL_SERVER_ERROR"
},
"message": "select distinct \"o0\".* from \"organizations\" as \"o0\" - relation \"organizations\" does not exist",
"locations": [
{
"line": 2,
"column": 5
}
],
"path": [
"organizations"
],
"context": {
"message": "select distinct \"o0\".* from \"organizations\" as \"o0\" - relation \"organizations\" does not exist",
"locations": [
{
"line": 2,
"column": 5
}
],
"path": [
"organizations"
]
}
}
],
"data": {
"organizations": null
}
}
API Error Message:
error: select distinct "o0".* from "organizations" as "o0" where "o0"."name" = 'cold-climate-development' order by "o0"."id" desc limit 1 - relation "organizations" does not exist at Parser.parseErrorMessage ([project root]node_modules/.pnpm/[email protected]/node_modules/pg-protocol/dist/parser.js:283:98) at Parser.handlePacket ([project root]node_modules/.pnpm/[email protected]/node_modules/pg-protocol/dist/parser.js:122:29) at Parser.parse ([project root]node_modules/.pnpm/[email protected]/node_modules/pg-protocol/dist/parser.js:35:38) at Socket.<anonymous> ([project root]node_modules/.pnpm/[email protected]/node_modules/pg-protocol/dist/index.js:11:42) at Socket.emit (node:events:514:28) at addChunk (node:internal/streams/readable:376:12) at readableAddChunk (node:internal/streams/readable:349:9) at Readable.push (node:internal/streams/readable:286:10) at TCP.onStreamRead (node:internal/stream_base_commons:190:23) at TCP.callbackTrampoline (node:internal/async_hooks:130:17)
From the error log, you would think the requested org doesn't exist especially since the error is thrown when addUserToContext() attempts to get an organization by name.
Describe the bug
I was looking through the mikro-orm docs and noticed that they say you can pass in the connection string as 'clientUrl' inside mikroOrmConfig.
So I set that up thinking I could get rid of the custom url parsing script:
However, when I ran a simple query to list all organizations, I got this error :
API Error Message:
From the error log, you would think the requested org doesn't exist especially since the error is thrown when
addUserToContext()
attempts to get an organization by name.But if I revert the change in mikroOrmConfig to go back to using my custom script to parse the URL to extract the database connection values,
then running the same query again works (notice 'cold-climate-development' exists)
I realize this is possibly due to a bug in mikro-orm's parsing of the URL but just wanted to alert you to another example of the logging issue.
To Reproduce
Configure the MikroORM adapter with a
clientUrl
.Expected behavior
Connection works, or a clear error message is created.
Actual behavior
pg
says relation doesn't exist.Additional context
https://graphweaver.slack.com/archives/D0730MYM74Z/p1726178289691349?thread_ts=1723672001.215299&cid=D0730MYM74Z
The text was updated successfully, but these errors were encountered: