Uploaded image for project: 'Kafka Connector'
  1. Kafka Connector
  2. KAFKA-319

Include the full cause in log message on schema failure

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • None

    Description

      Current code loses the original error message but outputs the stacktrace:

          } catch (Exception e) {
            Supplier<String> errorMessage =
                () ->
                    format(
                        "Exception creating Source record for: Key=%s Value=%s",
                        keyDocument.toJson(), valueDocument.toJson());
            if (sourceConfig.logErrors()) {
              LOGGER.error(errorMessage.get(), e);
            }
      

      Update the errorMessage supplier to include the original exception message at the start of the message.

      Attachments

        Activity

          People

            maxim.katcharov@mongodb.com Maxim Katcharov
            ross@mongodb.com Ross Lawley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: