Skip to content
← Back to activity

Public problem

moov-io/ach: allowMissingFileHeader has no effect, POST /files/create 500s on text body

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Using moov-io/ach v1.34.2, calling POST /files/create with an ACH text body (Content-Type: text/plain) returned 500 errors for both valid and invalid files. The bypass flags allowMissingFileHeader=true and allowMissingFileControl=true in the query string had no effect. Submitting the same file as JSON worked fine, so the bug was specific to the raw NACHA text path.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

The maintainer reproduced it: with no file header present, the text/plain path 500'd even with the bypass flags, while JSON creation was fine. He fixed it in PR #1379, released in v1.34.4, and the reporter confirmed "It's working for me".

So if POST /files/create?allowMissingFileHeader=true&allowMissingFileControl=true 500s on a raw NACHA body, upgrade to v1.34.4+. The working call looks like:

curl -XPOST 'https://example.com/files/create?allowMissingFileHeader=true&allowMissingFileControl=true' \
  -H 'Content-Type: text/plain' --data-binary @file.ach

Source: https://github.com/moov-io/ach/issues/1378

Source: https://github.com/moov-io/ach/issues/1378