fix(machines): ensure machine details probe resolves
This commit is contained in:
parent
3fce36d4e5
commit
55316e51c6
2 changed files with 68 additions and 33 deletions
|
|
@ -15,9 +15,11 @@ export async function GET(_req: NextRequest, ctx: { params: Promise<{ id: string
|
|||
return NextResponse.json(data, { status: 200 })
|
||||
} catch (err) {
|
||||
if (err instanceof ConvexConfigurationError) {
|
||||
console.error("[api] admin/machines/[id]/details configuration error", err)
|
||||
return NextResponse.json({ error: err.message }, { status: 500 })
|
||||
}
|
||||
console.error("[api] admin/machines/[id]/details error", err)
|
||||
return NextResponse.json({ error: "Internal error" }, { status: 500 })
|
||||
const message = err instanceof Error && err.message ? err.message : "Internal error"
|
||||
return NextResponse.json({ error: message }, { status: 500 })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue