frmscoe / tms-service

1 stars 3 forks source link

`transaction` field serialisation in TMS will not work for 3/4 routes #144

Closed rtkay123 closed 1 month ago

rtkay123 commented 3 months ago

In the different routes for handling requests in the tms, there is a call to:

server.handleResponse({
    transaction,
    // omitted
})

Which calls .encode() on FRMSMessage from a protobuf message.

The transaction expected by server.handleResponse() is of type Transaction, as noted in the .proto file here. This transaction is represented as:

    message Transaction {
        string TxTp = 1;
        Fitofipmtsts FIToFIPmtSts = 2;
    }

Namely, a FIToFIPmtSts field is expected, which only exists in a Pacs002 message. However, all the route handlers in the tms submit a transaction to server.handleResponse() which in 3/4 routes, is not a Pacs002 message.

I am unsure about the impact of this change though, but I think this should be an error

Acceptance Criteria

  1. code-lib version bump
  2. Start-up-lib version bump
  3. Unit testing for 4 dif message types
  4. End-to-end testing