Skip to content

chore(event): normalize event payload titles#638

Merged
neSpecc merged 4 commits intomasterfrom
title-fallback
Apr 9, 2026
Merged

chore(event): normalize event payload titles#638
neSpecc merged 4 commits intomasterfrom
title-fallback

Conversation

@neSpecc
Copy link
Copy Markdown
Member

@neSpecc neSpecc commented Apr 9, 2026

Problem

Sometimes we got events without title in DB — in this case ProjectOverview is not open because of error:

Cannot return null for non-nullable field EventPayload.title

Cause

  1. JS Catcher can send events without title (See fix: preserve content when promise is rejected with plain object hawk.javascript#172)
  2. Collector side validation is missed

Solution

Add "Unknown" title as a fallback

neSpecc and others added 2 commits April 9, 2026 14:45
Ensure daily events always have a non-empty payload.title by adding normalizeDailyEventsPayloadTitle in src/resolvers/project.js; when missing it sets a fallback title 'Unknown' and logs a warning with identifiers. Integrates the normalizer into Project.dailyEventsPortion. Adds unit tests to verify fallback behavior and that valid titles are preserved. Also bumps @hawk.so/nodejs to 3.3.2 in package.json.
@neSpecc neSpecc merged commit afaf103 into master Apr 9, 2026
7 checks passed
@neSpecc neSpecc deleted the title-fallback branch April 9, 2026 13:35
neSpecc added a commit that referenced this pull request Apr 9, 2026
* Normalize daily event payload titles

Ensure daily events always have a non-empty payload.title by adding normalizeDailyEventsPayloadTitle in src/resolvers/project.js; when missing it sets a fallback title 'Unknown' and logs a warning with identifiers. Integrates the normalizer into Project.dailyEventsPortion. Adds unit tests to verify fallback behavior and that valid titles are preserved. Also bumps @hawk.so/nodejs to 3.3.2 in package.json.

* Bump version up to 1.4.12

* cover empty and blank title with test

* lint

---------

Co-authored-by: Peter <specc.dev@gmail.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants