code: HttpResponse validateAndStoreSpans(SpanBytesDecoder decoder, byte[] serializedSpans) {
      // logging already handled upstream in UnzippingBytesRequestConverter where request context exists
      if (serializedSpans.length == 0) return HttpResponse.of(HttpStatus.ACCEPTED);
      try {
        SpanBytesDecoderDetector.decoderForListMessage(serializedSpans);
      } catch (IllegalArgumentException e) {
        metrics.incrementMessagesDropped();
        return HttpResponse.of(
          BAD_REQUEST, MediaType.PLAIN_TEXT_UTF_8, "Expected a " + decoder + " encoded list\n");
      }
  
      SpanBytesDecoder unexpectedDecoder = testForUnexpectedFormat(decoder, serializedSpans);
      if (unexpectedDecoder != null) {
        metrics.incrementMessagesDropped();
        return HttpResponse.of(
          BAD_REQUEST, MediaType.PLAIN_TEXT_UTF_8,
          "Expected a " + decoder + " encoded list, but received: " + unexpectedDecoder + "\n");
      }
  
      CompletableCallback result = new CompletableCallback();
      List<Span> spans = new ArrayList<>();
      if (!decoder.decodeList(serializedSpans, spans)) {
        throw new IllegalArgumentException("Empty " + decoder.name() + " message");
      }
      collector.accept(spans, result);
      return HttpResponse.from(result);
    }
docs: This synchronously decodes the message so that users can see data errors.