Closed mpayson closed 6 years ago
@mpayson thanks for reporting this. Seems like at a minimum these warnings should only be issued when NODE_ENV !== 'production'
. Would that be enough for your use case? We put in the warnings because ArcGIS clients can break when the fields
array elements have data types that do not match the data types in the feature properties.
I think the only unintended consequence of your proposal is that when there is a mismatch between the fields
data-type and feature properties data type, and that mismatch causes breakage on ArcGIS client, a developer wouldn't get the warning as a clue for diagnosing the problem.
@rgwozdz makes sense, that would fit my use case, thanks!
@mpayson FYI, just back from holiday leave. This is still on my radar.
@mpayson - FeatureServer release 2.15.2 will suppress warnings when NODE_ENV === 'production'
or KOOP_WARNINGS === 'suppress'
. yarn upgrade
should get you this latest version of FeatureServer.
There are still a few warnings in the Winnow dependency. Will address those in same manner.
Added warning suppression to Winnow 1.16.4.
I'm working with a dataset that has a good number of missing values. This causes Koop to throw
on every query. Is there a way to silence or modify these warnings?
A couple examples:
Double
forNaN
orString
fornull
/undefined
field.type = Integer
andfeatureField.type = Double | String
NaN
for invalid datesDouble
forNaN
field.type = Date
andfeatureField.type = Double
Since the metadata/feature property check is okay with
featureField.type = Integer
andfield.type = Date | Double
, my warnings could be fixed if detectType returnsInteger
for NaN, but I'm not sure if this would have unintended side effects.thanks!