DJB160
DJB160
TTCTheo's Typesafe Cult
Created by DJB160 on 7/12/2024 in #questions
What's the best way to pass up to the frontend that my database in currently inaccessible?
t3 + trpc + primsa + Next14 + server components combo. I'm just trying to make my backend a little more robust. Assuming I've turned off my database in order to simulate issues. Currently I get a standard error. I'd like to pass this back you to the frontend as a more friendly "There was a problem with the Database. Please try again later" type message. src\trpc\server.ts catches the error just fine at....
.catch((cause: TRPCErrorResponse) => { observer.error(TRPCClientError.from(cause)); });
Is there an established, or recommended, way to to best catch and pass this up to frontend page? I see the page uses TRPC Subscriptions/observable. Should I be modifying the default T3 provided code here?
6 replies
TTCTheo's Typesafe Cult
Created by DJB160 on 2/1/2024 in #questions
docker database good practices for small projects
Does anyone have links to good practices for self hosting databases and Dev/Prod deployments? Context: Synology > Docker > [mysql, postgres]. I'm just wondering what is good practice for separating Dev and Prod data for any given project? - Is it okay to use the one Container? - Is just using separate Databases acceptable? - Is there other ways I haven't even considered ?
2 replies
TTCTheo's Typesafe Cult
Created by DJB160 on 1/11/2024 in #questions
radix - slack or discord
Does anyone know if there's a Discord or Slack for asking questions regarding radix-ui, or should I just use their Github Discussions?
5 replies
TTCTheo's Typesafe Cult
Created by DJB160 on 7/21/2023 in #questions
adobe react spectrum
Has anyone had any experience using Adobe React Spectrum? Searching didn't bring up anything much except a short discussion on DatePicker components. I've just started a person T3 stack project and wanted to give Adobe react-aria-components a go. I've just gone to add a Form (https://react-spectrum.adobe.com/react-spectrum/Form.html) and as far as I can tell Adobe's Spectrum is an overall style provider, which sounds like ChakraUI to me so I'm a bit hesitant to use it. I rabbit-holed myself using ChakraUI in a work project, which I seriously regret using, after getting a fair way in and hitting UX limitations I'm not experienced enough to build my way out of. Just wondering if anyone more experienced has used it and can offer any advice?
1 replies