Hi folks,
Consider the following API route, using Solid Start:
export async function GET() {
const things = await fetchAllThingsFromDb();
return json(things);
}
export async function GET() {
const things = await fetchAllThingsFromDb();
return json(things);
}
If the DB throws an error, what is the idiomatic way to handle it with Solid Start instead of the default 500 response?
Or is it my responsibility to wrap every DB call with a try/catch?