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

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: P2
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 4.1.2
    • Environment:

      Goldenrod mod-source-record-storage-4.0.4
      duke-okapi.folio-dev.indexdata.com

    • Template:
    • Sprint:
      Folijet Sprint 100, Folijet Sprint 101, Folijet Sprint 102
    • Story Points:
      2
    • Development Team:
      Folijet
    • Release:
      Q3 2020 Bug Fix
    • Affected Institution:
      Duke
    • Confidence factor:
      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

                Assignee:
                VRohach Volodymyr Rohach
                Reporter:
                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