-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#8723 Fix for WMTS background issues due to attribution
parameter; #8724 WMTS request identify flow fixes
#8725
#8723 Fix for WMTS background issues due to attribution
parameter; #8724 WMTS request identify flow fixes
#8725
Conversation
…on` parameter; geosolutions-it#8724 WMTS request identify flow fixes
@alex-fko once reviewed and tested needs backporting to 2022.01.xx |
}, | ||
getIdentifyFlow: (layer, basePath, params) => | ||
Observable.defer(() => axios.get(basePath, { params })) | ||
.catch((e) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you tested this? I'm afraid this catch will never be called because
- errors are not trown, axios will receive a standard OGC error, that has HTTP status 200.
- You are returning the Exception, or data, while catch requires to return an observable.
I'm afraid you added the code but you didn't tried it.
Something like this should work
.let(interceptOGCError) // from ObservableUtils
.catch(e => {
// do things
if(notManaged) { // if you can not manage exception.
throw e;
}
return Observable.of({data: {features: []} } );
// or, if not managed
});
should work. So you should add a unit test with the response and the expected result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't want to accuse of course :)
When I said "I'm afraid you added the code but you didn't tried it." I meant that you committed in error.
It is strange, usually they respond with 200. I had not data to try it, so I wasn't able to verify myself.
I will try with #/geostory/41714, thank you for clarifying
Anyway catch should return an Observable, not returning single values or error, at least returning an observable that emits these things. throw
is a possibility, but depends on what it the function that uses it expect. I'll check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I tested it. Sorry my fault.
I did an error reading the code. Also returning exception I think it is ok. You can revert the changes.
Unit test should be added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summarising our discussion, it seems that the withPopupSupport
doesn't correctly support erroring responses.
We should verify any output format and check if the solution works also on mapviewer consistently with the error expected.
@offtherailz I've added unit test to make sure it properly handles TileOutOfRange exception. |
@ElenaGallo, could you please test this on DEV ? Thank you. on dev we have #/geostory/41714 to use for testing |
@ale-cristofori @alex-fko told me this have to be backported to 2022.01.xx too. |
@offtherailz @ale-cristofori connected issues are for bug fixes, therefore I guess these can land in 2022.02.01 and so backported to 2022.02.xx once tested in DEV. |
@ElenaGallo please test the connected issues in DEV and let us know. |
Test passed, @alex-fko please backport to 2022.02.xx.Thanks |
…on` parameter; geosolutions-it#8724 WMTS request identify flow fixes (geosolutions-it#8725) (cherry picked from commit 88c7ad8)
…on` parameter; geosolutions-it#8724 WMTS request identify flow fixes (geosolutions-it#8725) (cherry picked from commit 88c7ad8)
Backport has been merged. |
Description
This PR applies minor changes to resolve following issues:
8723
8724
attribution
parameter passed to the requests. While parameter itself doesn't break anything, having html tags in it makes tile requests fail. Applied changes just making sure that attribution is used by MapStore, but not being added to the request.ref
property. Such feature can potentially cause React exception because of props spreading inRowViewer
component. With the applied changesref
property is omitted prior to spreading.GetFeatureInfo
request fail with 400 error. This error was not handled properly on the side of identify flow for WMTS layer. It resulted into epic error and complete outage of side-effects processing. Applied changes adding extra check to the identify flow for WMTS layers to make sure that error is processed properly if request fails because row/column is out of range.Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the current behavior?
8723
8724
What is the new behavior?
According to the description. Please refer to the example map/geoStory in referenced issues for testing.
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information