CRS Conversion convertGeoJson needs to validate input - 500 error
Unhandled error occurs when invalid input is sent to convertGeoJson.
curl --location '.../api/crs/converter/v2/convertGeoJson' \
--header 'Authorization: Bearer TOKEN' \
--header 'data-partition-id: partition-id \
--header 'Content-Type: application/json' \
--header 'correlation-id: id \
--data '{"toCRS":"{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"4326\"},\"name\":\"GCS_WGS_1984\",\"type\":\"LBC\",\"ver\":\"PE_10_3_1\",\"wkt\":\"GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433],AUTHORITY[\\\"EPSG\\\",4326]]\"}","toUnitZ":"{\"baseMeasurement\":{\"ancestry\":\"Length\",\"type\":\"UM\"},\"scaleOffset\":{\"offset\":0.0,\"scale\":1.0},\"symbol\":\"m\",\"type\":\"USO\"}"}'
The input here is missing the required FeatureCollection
Reponse:
{
"code": 500,
"reason": "Server error.",
"message": "An unknown error has occurred."
}
convertGeoJson did not validate this. 500 error was returned, caused a Service-Availability Fast Burn Alert. This error should be handled gracefully and return a 400 Bad Request.