Open-EO / openeo-js-client

JavaScript and TypeScript client for the openEO API.
https://open-eo.github.io/openeo-js-client/latest/
Apache License 2.0
15 stars 6 forks source link

Misleading error message when successfully creating job but failing to fetch it immediately #37

Closed christophfriedrich closed 3 years ago

christophfriedrich commented 3 years ago

Steps to reproduce:

  1. Use the VITO backend
  2. Add any process graph
  3. Click "Create", enter a name and submit
  4. Watch the POST being successful in the console
  5. See that this gets followed by an immediate GET https://openeo.vito.be/openeo/1.0/jobs/undefined, which is an error 404
  6. See this error message on the screen:

Sorry, could not create a batc... Request failed with status code 404

So the error message obviously originates from the GET, but it reads as if the POST was at fault (at least the part that is readable, before the ellipsis).

christophfriedrich commented 3 years ago

It seems like the undefined in the GET request is NOT due to the backend not supplying the identifier in its reply to the POST:

image

m-mohr commented 3 years ago

This is an issue on VITOs side, a CORS header is missing, see https://github.com/Open-EO/openeo-python-driver/issues/54 I improved (mainly) the JS client to report better error messages.