Skip to content

fic(ifc): Fix for element quantities that contain nan values #458

Merged
JR-Morgan merged 1 commit intomainfrom
jrm/ifc-nan-fix
Oct 2, 2025
Merged

fic(ifc): Fix for element quantities that contain nan values #458
JR-Morgan merged 1 commit intomainfrom
jrm/ifc-nan-fix

Conversation

@JR-Morgan
Copy link
Copy Markdown
Member

@JR-Morgan JR-Morgan commented Oct 2, 2025

We got some alerts of a flood of 400 errors triggered by IFC uploads.

I believe this is caused by NaN values being sent to the server.
js and python disagree with how to serialize NaN values, so the server was handling the post requests to /objects/:streamId as invalid json.

In this PR, for IFC values that we know may be NaN, I'm mapping them to None values.
This follows the js standard of mapping to null value
The python standard is to serialize them as a NaN keyword value.

I've also see other serializers write a "NaN" value instead... but felt that none is easier to deal with than mixing types.

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.61%. Comparing base (e4453f0) to head (159e040).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #458   +/-   ##
=======================================
  Coverage   90.61%   90.61%           
=======================================
  Files         138      138           
  Lines        6373     6373           
=======================================
  Hits         5775     5775           
  Misses        598      598           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JR-Morgan JR-Morgan requested a review from gjedlicska October 2, 2025 11:12
@JR-Morgan JR-Morgan enabled auto-merge (squash) October 2, 2025 11:58
@JR-Morgan JR-Morgan merged commit af42b09 into main Oct 2, 2025
7 checks passed
@JR-Morgan JR-Morgan deleted the jrm/ifc-nan-fix branch October 2, 2025 12:21
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