From 610f392bf8f768cd5f811f891427c783c63a00b8 Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Thu, 22 Sep 2022 14:34:10 -0700 Subject: [PATCH] Remove TODO about possible array body in runHttpQuery I don't think this TODO is necessary. `runHttpQuery` is only called in the event that `httpRequest.body` is not an array from the `runPotentiallyBatchedHttpQuery` function. These are both private API. In the event that we do pass a batched body for some reason, we'll still get an error, it just won't be quite as helpful as we'd want. --- packages/server/src/runHttpQuery.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/server/src/runHttpQuery.ts b/packages/server/src/runHttpQuery.ts index 0035724ac62..8fd2333dcfc 100644 --- a/packages/server/src/runHttpQuery.ts +++ b/packages/server/src/runHttpQuery.ts @@ -119,7 +119,6 @@ export async function runHttpQuery( switch (httpRequest.method) { case 'POST': { - // TODO(AS4): If it's an array, some error about enabling batching? if (!isNonEmptyStringRecord(httpRequest.body)) { throw new BadRequestError( 'POST body missing, invalid Content-Type, or JSON object has no keys.',