Derock
Explore posts from serversis it possible to send error codes that aren't listed (eg 503 - service unavailable)
When creating a
TRPCError
you can specify a code out of the ones listed on the docs
But out of these, the only 5xx error is internal server error. I would like to send a 503 to indicate that the request was properly formatted, but the server isn't ready to handle it yet. It's not necessarily a server error.2 replies
DTDrizzle Team
•Created by Derock on 5/15/2024 in #help
need help with drizzle transactions and foreign key constraints
8 replies
DTDrizzle Team
•Created by Derock on 4/28/2024 in #help
cannot migrate database: PostgresError: unterminated /* comment at or near "/*
1 replies
DTDrizzle Team
•Created by Derock on 4/27/2024 in #help
ts: Object literal may only specify known properties except the property is known
5 replies
DTDrizzle Team
•Created by Derock on 4/23/2024 in #help
SQLite: set fk constraint to be "DEFERRABLE INITIALLY DEFERRED"
I would like to use this feature of sqlite, but I don't see it mentioned anywhere in the docs. A quick search shows that there's an open issue (#1429) but no progress has been made.
Are there any temporary workarounds to this? Like can I add in my own SQL to the end of a column definition?
3 replies
DTDrizzle Team
•Created by Derock on 12/19/2023 in #help
`no such table: main.__old_push_projects` after db push
Added the following to a table named
service
:
and ran pnpm drizzle-kit push:sqlite
it warned:
__old_push_projects
is never mentioned in my codebase. I have a table named projects
, and thats the closest thing.
now my server errors with:
"no such table: main.__old_push_projects"What is this table supposed to be and how can I get it back?
19 replies
Is it possible to only use WebSockets when necessary, otherwise use httpbatch or http?
I have an application, and on certain pages I need live data. Is there a way to only have tRPC open a websocket for subscriptions and then use another link otherwise?
I would like for the solution to disconnect from WS when all subscriptions have been ended, so no dangling WS connections.
15 replies
How to set cookies in trpc response?
I have an app dir project that was created using this t3-app PR.
On the client I have a form and I am using the trpc react client:
and I have the following route defined:
This does not set the cookie though -- no
Set-Cookie
header is in the response.
I have no idea how to access the response manually to add the header in either.11 replies
DTDrizzle Team
•Created by Derock on 11/2/2023 in #help
How do I load sqlite extensions for drizzle-kit?
In my code, when I want to use drizzle I am doing the following:
to test my application, I want to use drizzle-kit to create my database, so I created a drizzle.config.ts
but when I run
drizzle-kit push:sqlite
, I get SqliteError: near "(": syntax error
and I think this is because for some of my tables I have .default(sql`uuid_generate_v7()`) but that function only exists when the sqlite extension is loaded which it isnt when Im running drizzle kit4 replies
TTCTheo's Typesafe Cult
•Created by Derock on 4/16/2023 in #questions
NextAuth "[next-auth][error][JWT_SESSION_ERROR]" (CredentialsProvider)
This is my first time using next-auth, and I am trying to get basic credentials-based authentication implemenmted.
10 replies
Is it possible to link two domains to one service, but have the ports different?
I am trying to deploy https://logto.io/ and it serves the public frontend on
:3001
and the admin panel on :3002
How can I configure railway to have one domain forwarded to :3001
and another to :3002
?8 replies