Skip to content

[Datahub] FIX handle error (display msg) also for TMS#1259

Merged
tkohr merged 14 commits intomainfrom
fix-tms-source-error
Jun 12, 2025
Merged

[Datahub] FIX handle error (display msg) also for TMS#1259
tkohr merged 14 commits intomainfrom
fix-tms-source-error

Conversation

@AlitaBernachot
Copy link
Copy Markdown
Collaborator

@AlitaBernachot AlitaBernachot commented Jun 3, 2025

Description

This PR displays an error message on the map when TMS endpoint fails.
It also forces the display of the source even if the enpoint fails to respond (dropdown was empty before the fix).

Another fix, display api links even if one TMS endpoint is in error:
image

Architectural changes

None (no update of the sdk needed)

Screenshots

image

image

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

How to test

Follow these instructions to confirm an error message is displayed on the map when the TMS endpoint fails to respond.
The dataset should have a (failing) TMS link: https://data.geopf.fr/tms/ to reproduce the error. (NB. the correct url is https://data.geopf.fr/tms/la_ciotat_gpkg_21-05-2025_tms but this is not what we want to test here)

image

you can add this failing TMS via the XML editor:

<mrd:onLine type="offering" offeringId="53173c7d-7974-4341-8d30-91e69a56d206">
    <cit:CI_OnlineResource>
       <cit:linkage>
          <gco:CharacterString>https://data.geopf.fr/tms/</gco:CharacterString>
       </cit:linkage>
       <cit:protocol>
          <gco:CharacterString>TMS</gco:CharacterString>
       </cit:protocol>
       <cit:name>
          <gco:CharacterString>la_ciotat_gpkg_21-05-2025_tms</gco:CharacterString>
       </cit:name>
    </cit:CI_OnlineResource>
 </mrd:onLine>

or you can use this dataset: https://ign-gpf-test.apps.gs-ch-prod.camptocamp.com/geonetwork/srv/eng/catalog.search#/metadata/zzz_nl_test_wfs_syth_la_ciotat.

Go to the dataset's page (eg. http://localhost:4200/dataset/zzz_nl_test_wfs_syth_la_ciotat) and check the Map overview, it should display an error message.

Try to add other type of sources, it should display the other sources as before.


@AlitaBernachot AlitaBernachot force-pushed the fix-tms-source-error branch 2 times, most recently from 50c552d to c8de0e8 Compare June 4, 2025 14:04
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 4, 2025

Affected libs:
feature-dataviz,feature-record,feature-router,database-dump

Affected apps:
datahub,metadata-editor,demo,webcomponents

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 4, 2025

📷 Screenshots are here!

@coveralls
Copy link
Copy Markdown

coveralls commented Jun 4, 2025

Coverage Status

coverage: 83.891% (-0.4%) from 84.332%
when pulling 9a7c4a3 on fix-tms-source-error
into 320c95c on main.

@AlitaBernachot AlitaBernachot force-pushed the fix-tms-source-error branch 3 times, most recently from 7f84573 to 2022c71 Compare June 5, 2025 12:43
Copy link
Copy Markdown
Collaborator

@tkohr tkohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @AlitaBernachot ! The error message displays on the map, the drop-down renders with the source title, and the API section does not stay empty.

The error message is rather generic, but this is also the case for other fetches by the data.service and getting more info here implies bigger changes in the geospatial-sdk and potentially even ol-mapbox-style if I recall correctly. So I agree to stick to your message for now.

@tkohr tkohr force-pushed the fix-tms-source-error branch from 9a7c4a3 to 1254533 Compare June 12, 2025 09:05
@tkohr tkohr merged commit 86c0fa7 into main Jun 12, 2025
13 checks passed
@tkohr tkohr deleted the fix-tms-source-error branch June 12, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants