Skip to content

Commit

Permalink
Remove TODO about possible array body in runHttpQuery
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
trevor-scheer committed Sep 22, 2022
1 parent 653d576 commit 610f392
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/server/src/runHttpQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ export async function runHttpQuery<TContext extends BaseContext>(

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.',
Expand Down

0 comments on commit 610f392

Please sign in to comment.