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

Fix errors seen on test deployment server #95

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

C-Loftus
Copy link
Collaborator

@C-Loftus C-Loftus commented Dec 2, 2024

  • Add more strict null checks
  • Make error message call out
  • Check for invalid bounds
  • Handles all errors on the dev server
  • Add a few more
  • Add a method for multiline errors by splitting on \n

Note, the non-synop collection seems to be registered with the wrong URL. When I fetch all the collections, the non-synop has a url whic points to http://136.156.130.194/oapi/collections/urn:wmo:md:test3:core.surface-based-observations.drifting-buoys.PROGRAM?f=json This is coming from pygeoapi directly. The PROGRAM part is capitalized but it shouldn't be. I can make this lowercase after fetching but wanted to clarify this since I believe it is directly from the test server and not caused by the UI.

Will add tests in future iteration once allign on these changes

@@ -234,7 +234,7 @@ export default defineComponent({
const nextDate = new Date(d.toISOString());
this.iterDate(nextDate);
try {
const response = await fetchWithToken(`${window.VUE_APP_OAPI}/collections/${station.properties.topic}/items?f=json&datetime=${nextDate.toISOString()}/..&sortby=+resultTime&index=${index}&limit=1&wigos_station_identifier=${station.id}`);
const response = await fetchWithToken(`${window.VUE_APP_OAPI}/collections/${station.properties.topic}/items?f=json&datetime=${nextDate.toISOString()}/..&sortby=resultTime&index=${index}&limit=1&wigos_station_identifier=${station.id}`);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Got rid of the + on the sort here since it was causing the fetch to fail.

Not super clear if pygeoapi supports that. If I remove + it works fine. @webb-ben please let me know if I am missing something here.

Copy link
Member

@webb-ben webb-ben Dec 2, 2024

Choose a reason for hiding this comment

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

if no +/- indicated, + is assumed, issue happens when the URL is serialized. Better to leave out

@@ -23,7 +23,12 @@
</v-card>
</template>
<template v-else>
<i>{{ $t("messages.no_observations_in_collection") }}</i>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I originally added this but I think it is bad UX so removed it and kept it the same as the UI currently has (i.e. no extra italic message)

Copy link
Member

Choose a reason for hiding this comment

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

Agreed

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.

2 participants