AtlasOfLivingAustralia / biocache-service

Occurrence & mapping webservices
https://biocache-ws.ala.org.au/ws/
Other
9 stars 26 forks source link

Map clicks in biocache UI fail - gateway mapping related error #819

Closed djtfmartin closed 7 months ago

djtfmartin commented 1 year ago

When clicking the points on the map in biocache UI, the call to the gateway fails in test.

Underlying call:

https://api.test.ala.org.au/occurrences/occurrences/info?q=*%3A*&qualityProfile=ALA&fq=contentTypes%3A%22GenomicDNA%22&zoom=12&lat=-10.782386474660953&lon=142.4674415588379&radius=0.15&format=json

which gives:

 The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)

the successful URL would look like

https://biocache-ws-test.ala.org.au/ws/occurrences/info?q=*%3A*&qualityProfile=ALA&fq=contentTypes%3A%22GenomicDNA%22&zoom=12&lat=-10.782386474660953&lon=142.4674415588379&radius=0.15&format=json

which gives


{
"count": 1,
"occurrences": [
"603312de-1dcb-45df-b536-dfedf178795f"
]
}
sughics commented 1 year ago

API Gateway specs updated to handle above request. https://github.com/AtlasOfLivingAustralia/aws-apig-cognito/commit/3ef0937336fc345c3e6a820989c5ea6d13db9cec

One of two params specified for Openapi specs in the application for this API Path seem invalid - instead of showing individual params from SpatialSearchRequestDTO, it instead sets the JSON object requestParams of SpatialSearchRequestDTO as the query parameter.

The above fix simply sets the API resource as http_proxy type ensuring that the params provided my client are passed onto the server as is.

adam-collins commented 7 months ago

appears done