Uploaded image for project: 'mod-source-record-storage'
  1. mod-source-record-storage
  2. MODSOURCE-200

Post to /source-storage/batch/records returns "null value in column \"description\" violates not-null constraint"

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • P2
    • Resolution: Done
    • None
    • 4.1.2
    • Goldenrod mod-source-record-storage-4.0.4
      duke-okapi.folio-dev.indexdata.com

    • Folijet Sprint 100, Folijet Sprint 101, Folijet Sprint 102
    • 2
    • Folijet
    • Q3 2020 Bug Fix
    • Duke
    • High

    Description

      Overview:
      Posting records to /source-storage/batch/records results in {"status":"500","message":"Internal Server Error","body":{"records":[],"errorMessages":["null value in column \"description\" violates not-null constraint"],"totalRecords":0}}

      Steps to Reproduce:

      1. Log into some FOLIO environment as duke_admin
      2. Send HTTP POST
        https://issues.folio.org/secure/attachment/31632/records.json

      Expected Results:
      Status 201 with records added to SRS

      Actual Results:
      {"status":"500","message":"Internal Server Error","body":{"records":[],"errorMessages":["null value in column \"description\" violates not-null constraint"],"totalRecords":0}}

      Additional Information:
      From logs:
      18:40:44.740 [vert.x-eventloop-thread-0] ERROR urceStorageBatchImpl [598554013eqId] Batch of records was processed, but records were not saved, error messages: [null value in column "description" violates not-null constraint]
      URL: /source-storage/batch/records

      Other info:
      It looks like it is trying to add an empty errorRecord to the record, but there is not an errorRecord in the posted record.
      rest.SourceStorageBatchImpl postSourceStorageBatchRecords
      services.RecordServiceImpl saveRecords getErrorMessages
      recordDao.executeInTransaction
      postgresClientFactory.getQueryExecutor
      recordDao.saveRecord
      insertOrUpdateRecord
      if (Objects.nonNull(record.getErrorRecord()))

      { return ErrorRecordDaoUtil.save(txQE, record.getErrorRecord()); }

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                VRohach Volodymyr Rohach
                jeffrey.fleming@duke.edu Jeff Fleming
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases