fix(test): include response body in error

This commit is contained in:
kolaente
2025-11-28 16:48:08 +01:00
parent 7f5a08b316
commit e43bac7fbc

View File

@@ -86,7 +86,8 @@ export class Factory {
)
if (!response.ok()) {
throw new Error(`Failed to seed data for table ${table}: ${response.status()} ${response.statusText()}`)
const body = await response.json()
throw new Error(`Failed to seed data for table ${table} (${response.status()}): ${body.message}`)
}
return response.json()