Ganesh
Ganesh
KPCKevin Powell - Community
Created by Ganesh on 4/8/2025 in #help
Error handling practices in ExpressJS
Or it would need multiple if else statments select which template/view to render
10 replies
KPCKevin Powell - Community
Created by Ganesh on 4/8/2025 in #help
Error handling practices in ExpressJS
If I want to send the error to the templating engine (EJS in this case) the centralized error middleware probably won't work
10 replies
KPCKevin Powell - Community
Created by Ganesh on 4/8/2025 in #help
Error handling practices in ExpressJS
Yeah this is what I have been doing up until now sans the async handle because express 5 automatically passes thrown error, rejected promise to next in an async function
10 replies
KPCKevin Powell - Community
Created by Ganesh on 4/8/2025 in #help
Error handling practices in ExpressJS
Yeah I was planning on catching the thrown error then doing res.render like the above example code. My worry was mainly that i would have to duplicate the res render bit if i have multiple middleware that could each throw an error. Tho I guess I can just create a function that takes response object, error and renders the proper view Thank you both for confirming that the docs mean to handle the error in middleware.
10 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
it's probably some spagetti code
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
It shouldn't work technically since I didn't have it when i first got error
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
thanks for helping btw ἔρως
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
whatever we'll see if it breaks with next npm init
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
I removed the json.schema snippet from the settings json and it suddenly started working
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
No description
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
you can do that right?
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
I'll let it stay on it was mostly cause i was curious about the error. Maybe i'll create a js script that downloads the package schema and adds it locally in the project
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
already did on the latest version
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
ok it appears to bundle both. Tho I'm not sure how to test this theory in vs code. for node i could just pass --network-family-autoselection-attempt-timeout=500 not sure how to achieve that in vs code
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
A couple days ago I was having trouble when fetching in node due to it's implementaion of happy path algorithm. Do you think that can be the problem here? I forgot if electron bundled node with it or just browser environment
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
no dice
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
same
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
hmm the error returned
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
No description
28 replies
KPCKevin Powell - Community
Created by Ganesh on 2/27/2025 in #os-and-tools
VS code problems loading package.json schema
No description
28 replies