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 authored and glasser committed Sep 24, 2022
1 parent bd8652f commit ecd3ad5
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 @@ -125,7 +125,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 ecd3ad5

Please sign in to comment.