Skip to content

fix: improve error message for wrongly formatted history files#1248

Open
Bhavysinghal wants to merge 1 commit into
OpenTermsArchive:mainfrom
Bhavysinghal:fix/history-file-format-error-message
Open

fix: improve error message for wrongly formatted history files#1248
Bhavysinghal wants to merge 1 commit into
OpenTermsArchive:mainfrom
Bhavysinghal:fix/history-file-format-error-message

Conversation

@Bhavysinghal
Copy link
Copy Markdown

Fixes #1184

What this does

When a history file is formatted incorrectly (using {} object instead
of [] array), the engine previously threw a confusing error:
"serviceHistory(termsType) push is not a function"

This change adds a validation check that throws a clear, human-readable
error message instead, telling the contributor exactly what is wrong and
how to fix it.

Why

As reported in issue #1184, this confusing error message caused confusion
for contributors. A clear error message will help future contributors
immediately understand and fix their mistake.

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.

Confusing error message with wrongly formatted history files

1 participant