Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moov library fails to parse Valid Wire Message #404

Open
nitu-luna opened this issue Jun 7, 2024 · 2 comments
Open

Moov library fails to parse Valid Wire Message #404

nitu-luna opened this issue Jun 7, 2024 · 2 comments

Comments

@nitu-luna
Copy link

Wire Version: v0.15.5

What were you trying to do? Parse an incoming message

What Wire specification are you referencing? Fedwire Application interface Manual

What did you expect to see? Message parsed successfully

What did you see? unable to parse wire file - line:15 record:InstructingFI *wire.FieldError IdentificationCode is an invalid identification code
line:18 record:UnstructuredAddenda wire.TagWrongLengthErr must be 10 characters and found 93

How can we reproduce the problem? {1100}30P N{1110}06070806FT03{1120}20240607MFP0003000000906070806FT03{1510}1000{1520}20240607MM12MP2K008465{2000}000000052200{3100}024567821TEST BK*{3400}101014578TEST BK*{3600}CTP{3610}IXML{4200}D241/ABC2/ADDR*{4320}SW*{5010}/12341/PLTD2/STREET3/GB/XYZ{5100}BfdfLTDTHENGFLLON*{5200} XXX{6000}1*{6500}/XXX*{8200}<<>>

@NitheeshKumar-k
Copy link

NitheeshKumar-k commented Jun 26, 2024

I am facing the same issue and I am unable to parse a valid wire file due to the absence of Addenda length in the tag {8200} Unstructured Addenda.

As per the below document faim 3.0.7 8200 tag modifications, the addenda length is no longer a valid field and the Addenda Information length has been updated to 9000 characters

https://www.frbservices.org/binaries/content/assets/crsocms/financial-services/wires/faim-3-0-7-tag-8200-changes-faq-july-2022.pdf

func (ua *UnstructuredAddenda) Validate() error {
	if err := ua.fieldInclusion(); err != nil {
		return err
	}
	if ua.tag != TagUnstructuredAddenda {
		return fieldError("tag", ErrValidTagForType, ua.tag)
	}
	if err := ua.isNumeric(ua.AddendaLength); err != nil {
		return fieldError("AddendaLength", err, ua.AddendaLength)
	}
	if err := ua.isAlphanumeric(ua.Addenda); err != nil {
		return fieldError("Addenda", err, ua.Addenda)
	}

	return nil
}

As per the logic, we still validating the addenda length.

@bulhi
Copy link

bulhi commented Jul 8, 2024

Can confirm, we started receiving wires with the new tag 8200 format which is:

  1. a multi-line XML
  2. without the addenda length part.

e.g. something like

{8200}<!--<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08">
    <FIToFICstmrCdtTrf>
        <GrpHdr>
            <MsgId>CHASEMCBPR2024070500000012345678HV0</MsgId>
            <CreDtTm>2024-07-05T08:01:40.800+00:00</CreDtTm>
            <NbOfTxs>1</NbOfTxs>
            <SttlmInf>
                <SttlmMtd>INDA</SttlmMtd>
            </SttlmInf>
        </GrpHdr>
        ... 
    </FIToFICstmrCdtTrf>
</Document>--><<>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants