"500 Internal Server Error" for availableconstraint query when no data - SDMXRI-2191
When running an availableconstraint
query that returns no data (no data available) results in a 500 Internal Server Error
response with the message 'Could not find requested structures' in the response body
It is expected that the response is 200 OK
with an empty available constraint and with:
<common:Annotation id="obs_count">
<common:AnnotationTitle>0</common:AnnotationTitle>
<common:AnnotationType>sdmx_metrics</common:AnnotationType>
</common:Annotation>
Example
Staging:
- error: https://nsi-demo-stable.siscc.org/rest/availableconstraint/OECD,DF_KEI,2.0/.AUS..M?startPeriod=2020-10&dimensionAtObservation=AllDimensions&mode=available
- no error: https://nsi-demo-stable.siscc.org/rest/availableconstraint/OECD,DF_KEI,2.0/.AUS..M?dimensionAtObservation=AllDimensions&mode=available
QA:
- error: https://nsi-qa-stable.siscc.org/rest/availableconstraint/OECD,DF_KEI_21760,1.0/LRHUTTTT...M?startPeriod=2020-06&dimensionAtObservation=AllDimensions&mode=available
- no error: https://nsi-qa-stable.siscc.org/rest/availableconstraint/OECD,DF_KEI_21760,1.0/LRHUTTTT...M?startPeriod=2020-05&dimensionAtObservation=AllDimensions&mode=available
Jira ticket: https://citnet.tech.ec.europa.eu/CITnet/jira/browse/SDMXRI-2191
Edited by Pedro Carranza