diff --git a/apps/admin-x-framework/src/test/acceptance.ts b/apps/admin-x-framework/src/test/acceptance.ts index 4bf8a38ee9..dcf740ce3f 100644 --- a/apps/admin-x-framework/src/test/acceptance.ts +++ b/apps/admin-x-framework/src/test/acceptance.ts @@ -186,7 +186,12 @@ export async function mockApi }); } - const requestBody = JSON.parse(route.request().postData() || 'null'); + let requestBody = null; + try { + requestBody = JSON.parse(route.request().postData() || 'null'); + } catch { + requestBody = route.request().postData(); + } lastApiRequests[matchingMock.name] = { body: requestBody,