Skip to content
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

Handle bad layers at QGIS project loading and throw exception #3

Closed
rldhont opened this issue May 17, 2019 · 3 comments
Closed

Handle bad layers at QGIS project loading and throw exception #3

rldhont opened this issue May 17, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@rldhont
Copy link

rldhont commented May 17, 2019

qgis/QGIS#9991

@rldhont rldhont changed the title Handle bad layers at QGIS project laoding and throw exception Handle bad layers at QGIS project loading and throw exception Sep 13, 2019
@rldhont rldhont added the bug Something isn't working label Sep 13, 2019
@dmarteau
Copy link
Member

dmarteau commented Nov 7, 2019

Bad layers are dismissed at QgsProject.read(...), so we end without the bad layers. it seems that there is no flags or status that enable to check if layer were dismissed, no exception is thrown.....

@dmarteau
Copy link
Member

dmarteau commented Nov 7, 2019

Fixed in 5e8ad90

Need to implement a QgsProjectBadLayerHandler to catch up invalid layers. This behavior can be activated/deactivated with the cache.strict_check (QGSRV_CACHE_STRICT_CHECK) option.

@dmarteau dmarteau closed this as completed Nov 7, 2019
@dmarteau
Copy link
Member

dmarteau commented Nov 7, 2019

Note that the server will return a 422 HTTP error (Unprocessable entity) and not a 500.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants