jlarmst
jlarmst
TtRPC
Created by jlarmst on 4/21/2024 in #❓-help
v11 `Invalid Content-Type header`
Thank you everyone for your help!
15 replies
TtRPC
Created by jlarmst on 4/21/2024 in #❓-help
v11 `Invalid Content-Type header`
UPDATE: rc.347 did fix it. Manually setting a default header of content-type: "application/json" works in rc.347, but not rc.346
15 replies
TtRPC
Created by jlarmst on 4/21/2024 in #❓-help
v11 `Invalid Content-Type header`
So setting any headers means that the Content-Type must also be set manually, even when using the default clients
15 replies
TtRPC
Created by jlarmst on 4/21/2024 in #❓-help
v11 `Invalid Content-Type header`
I’ll try adding the Content-Type: "application/json" to the defaultHeaders object I use with -rc.347
15 replies
TtRPC
Created by jlarmst on 4/21/2024 in #❓-help
v11 `Invalid Content-Type header`
Locally! Links are custom based on the SOA example because I’m trying out serverless with sst too. The only thing I wrote down to check tomorrow is that I’m setting custom headers and not setting a content-type
15 replies
TtRPC
Created by jlarmst on 4/21/2024 in #❓-help
v11 `Invalid Content-Type header`
Thank you for the quick reply! It’s deeply tied to my personal project, but I will try to get a reproduction tomorrow
15 replies
TtRPC
Created by jlarmst on 12/16/2023 in #❓-help
SSR with initialData throws error
I believe the final answer is that initialData should never be undefined, unless using client:only
9 replies
TtRPC
Created by jlarmst on 12/16/2023 in #❓-help
SSR with initialData throws error
It works in the two other cases (Astro server component and react client component), so I suspect the issue is with the initialData props in the React SSR component.
The typescript types seems to indicate that I can pass the expected return value of the query as the initialData (which I fetch successfully from the trpc endpoint in the Astro server component), but perhaps I should pass something else like raw response or body? The same exact query works perfectly on the client if I don’t use initialData
9 replies
TtRPC
Created by jlarmst on 12/16/2023 in #❓-help
SSR with initialData throws error
I guess I'm confused because it works great with the vanilla client in an astro component, and works great with a client-only react component. Only when I try to use SSR and initialData with react do I get an error
9 replies
TtRPC
Created by jlarmst on 12/16/2023 in #❓-help
SSR with initialData throws error
It's bizarre, since it works fine in development. Are there additional logs or debugging steps I can use to investigate further?
9 replies
TtRPC
Created by jlarmst on 12/16/2023 in #❓-help
SSR with initialData throws error
Would it be better if I created a GitHub issue instead?
9 replies