Skip to content

Resolves issue #1882, Prevent append-audit requests without history from returning a 500.#1891

Merged
jdaigneau5 merged 2 commits into
devfrom
dr_1882
Jun 30, 2026
Merged

Resolves issue #1882, Prevent append-audit requests without history from returning a 500.#1891
jdaigneau5 merged 2 commits into
devfrom
dr_1882

Conversation

@david-rocca

Copy link
Copy Markdown
Collaborator

Closes Issue #1882

Summary

Append-audit requests now validate history before iterating it. Requests without a valid, non-empty history array return a clear 400 validation error instead of throwing a TypeError.

Important Changes

src/controller/audit.controller/audit.controller.js

  • Added append-audit validation for missing, non-array, or empty history.
  • Returns MISSING_REQUIRED_FIELD before opening a session or iterating entries.

test/integration-tests/audit/auditTest.js

  • Added a regression test for append-audit requests without history.
  • Retained existing success-path coverage for valid append-audit requests.

@jdaigneau5 jdaigneau5 linked an issue Jun 30, 2026 that may be closed by this pull request
5 tasks
@jdaigneau5 jdaigneau5 merged commit e576e17 into dev Jun 30, 2026
9 checks passed
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

Successfully merging this pull request may close these issues.

Return a validation error when append-audit is missing history

2 participants