500 Error Returned when Posting Records Chunk with Existing ID Value

Description

When posting record chunks to /change-manager/jobExecutions/{job_id}/records, if the same payload is posted twice, the server will return a 500 error, rather than an appropriate (and informative) 400/422 error. This becomes important when dealing with a read timeout on a previous post attempt (retry logic). We need to be able to determine, based on the error response, whether the batch already exists in the Kafka queue or some other error has occurred.

Steps to reproduce:

  1. Create a new jobExecution with the appropriate job profile

  2. Create a records payload

  3. Post the records payload

  4. Post the same records payload again

Expected results:

An error message indicating the reason for the error

Actual results:

A generic 500 error

Error log from mod-srm:

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

Assume all 500 errors are the result of duplicate payloads, but this could be problematic and result in other errors/failure states.

Attachments

1

Checklist

hide

Activity

Show:

Volodymyr Rohach February 21, 2025 at 3:13 PM

Hello everyone! It was fixed, now this is a 400 status code in the response on the same id. Tested on the snapshot env:

Feel free to double-check!

Moved it to the In Review column.

Brooks Travis February 13, 2025 at 5:34 PM
Edited

FYI. The underlying reason for handling this error (the read timeout and subsequent retry logic) seems to occur more regularly in Eureka-based environments than Okapi. it would be tremendously helpful for LoC data migration and overall implementation to have this resolved as soon as possible.

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Folijet

Fix versions

Release

Sunflower (R1 2025)

RCA Group

Requirements change

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created February 13, 2025 at 5:29 PM
Updated March 13, 2025 at 5:35 PM
Resolved February 21, 2025 at 3:31 PM
TestRail: Cases
TestRail: Runs