You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of our arcgis/esri clients provide requests that contain query parameters with empty values. We've noticed that two parameters in particular cause errors for our clients.
resultRecordCount=&groupByFieldsForStatistics=
When resultRecordCount= is provided the route.js query param validation does not handle empty/null values which causes a 400 to be returned. This is a reasonable response given that the arcgis documentation says The minimum value entered for this parameter cannot be below 1 and one can assume that an empty value does not meet this requirement.
When groupByFieldsForStatistics= is provided the filter-and-transform.js query call fails with Cannot convert undefined or null to object.
Is it possible to treat the empty values of these two parameters as if they weren't provided at all?
The text was updated successfully, but these errors were encountered:
Thanks @despainm. We should be able to make the changes you need. My preference would probably be to change the validator so that empty strings are valid, but then remove the empty string in followup normalization step. That way our validation schema aligns with all acceptable received values, rather than having us mutating responses in order to fit a validation schema we already control. If you could start a PR for this, that would probably expedite development. Thanks!
Some of our arcgis/esri clients provide requests that contain query parameters with empty values. We've noticed that two parameters in particular cause errors for our clients.
When
resultRecordCount=
is provided the route.js query param validation does not handle empty/null values which causes a 400 to be returned. This is a reasonable response given that the arcgis documentation saysThe minimum value entered for this parameter cannot be below 1
and one can assume that an empty value does not meet this requirement.When
groupByFieldsForStatistics=
is provided the filter-and-transform.js query call fails withCannot convert undefined or null to object
.Is it possible to treat the empty values of these two parameters as if they weren't provided at all?
The text was updated successfully, but these errors were encountered: