project icon indicating copy to clipboard operation
project copied to clipboard

Post requests to the `/participants/{type}/{ID}` endpoint with missing ID are processed successfully

Open theobadha opened this issue 5 months ago • 0 comments

Summary: POST requests to the /participants/{type}/{ID} endpoint where the {ID} parameter is missing are processed successfully - well, maybe not processed entirely, but no errors are thrown and a 202 response is sent back.

Severity: Low

Priority: Low

Expected Behavior POST requests to the /participants/{type}/{ID} endpoint where the {ID} parameter is missing should fail with an appropriate error code, and message.

Actual Response

{
  "status": 202,
  "statusText": "Accepted",
  "body": "",
  "headers": {
    "cache-control": "no-cache",
    "content-length": "0",
    "date": "Tue, 08 Jul 2025 14:04:43 GMT",
    "connection": "keep-alive",
    "keep-alive": "timeout=5"
  }
}

PS: From the logs, it seems the request fails in the backend? This snippet from the logs after running the request explains there's a duplicate entry. However no ID was issued in the request............ warn: error in db.insert insert intooracleMSISDN (fspId, id, subId) values ('payeefsp', '{ID}', DEFAULT) - ER_DUP_ENTRY: Duplicate entry '{ID}-' for key 'oracleMSISDN.PRIMARY' - {"code":"ER_DUP_ENTRY","component":"OracleDB","context":"MSISDN","stack":"Error: ER_DUP_ENTRY: Duplicate entry '{ID}-' for key 'oracleMSISDN.PRIMARY'\n at Sequence._packetToError

CURL request curl 'http://account-lookup-service:4002/participants/MSISDN/%7BID%7D' -H 'content-type: application/vnd.interoperability.participants+json;version=2.0' -H 'date: Tue, 08 Jul 2025 14:00:19 GMT' -H 'fspiop-source: payeefsp' -H 'accept: application/vnd.interoperability.participants+json;version=2.0' -H 'traceparent: 00-aabb849563bc2551b4bf6712bbe54cfa-0000000000000001-01' -H 'user-agent: axios/1.8.4' -H 'accept-encoding: gzip, compress, deflate, br' --data-binary '{"fspId":"payeefsp","currency":"XXX"}' --compressed

Specifications

  • Component (if known):
  • Version:
  • Platform:
  • Subsystem:
  • Type of testing:
  • Bug found/raised by:

Notes:

  • Severity when opened:
  • Priority when opened:

theobadha avatar Jul 08 '25 14:07 theobadha