-
Notifications
You must be signed in to change notification settings - Fork 91
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
Error messages when user hasn't accepted dataset EULA can be confusing #36
Comments
The UMM-C (CMR Collection) schema was updated to include EULA information, so this can now be determined programmatically by a client in order to provide better error handling: https://bugs.earthdata.nasa.gov/browse/SDRT-1236. I don't have an example handy but it looks like this is now included as a EULA identifiers list under UseConstraints (https://bugs.earthdata.nasa.gov/browse/ECSE-1213). |
@asteiker My understanding is that only tells us whether a collection has a EULA (and provides a link to accept it?), not whether the user has accepted it. Is that right? Maybe there's some data in the 403 response that we can use, e.g. |
@mfisher87 I believe there is indeed data in the 403 response that tells a client whether or not the EULA was accepted. The EULA response was utilized in the Harmony API for this exact use case. Does this Harmony test help? Can we leverage something similar for earthaccess? https://github.com/nasa/harmony/blob/main/services/harmony/test/eula-acceptance.ts |
Howdy! I recreated the problem using a fresh EDL account without accepting EULAs
|
Oh, and I used this dataset: https://disc.gsfc.nasa.gov/datasets/S5P_L2__CH4____HiR_1/summary |
Jess and Matt spoke during an Openscapes call today about the next steps on this issue. Jess will begin learning/experimenting with Python debugging to get a better look at the messages/code related to the observed errors. |
Hi, @mfisher87. I took time to figure out how to use debugging with Python. Either I was unsuccessful or the debugging tools aren't useful for this code. My interpretation is that there isn't an error associated with the code
|
Thanks for sharing back, Jess! I'm not sure I'll have time to dig in to this before next hack day. Would that be a good time to chat more about this? |
If you need to "talk," I have availability next Tuesday and Friday. Lemme know what works for you. |
The problem is that we're using Unfortunately, we're using @mfisher87, a possible short-term "fix" for this would be for us to pass either |
Nice sleuthing! My opinion: I tend to agree with |
I like the idea of exposing the control to the user. I suggest we name the additional parameter |
I definitely like |
No preferences because I don't know enough to provide a useful opinion. 😆 |
I prefer |
I think we're ready to implement this. @jessnicwelch are you interested in taking that on? @Sherwin-14 was looking for an issue that might be a good fit, but there are other options as well if you want this one :) |
I'm not sure what I'm implementing... sorry. If it's coding earthaccess, I don't think I have the expertise to do that. I'm better at documentation and testing. |
No apologies necessary :) Awesome work getting us this far! 🚀 Just to sum up in one place for everyone:
I'll update the OP with this summary. |
We can utilize the approach Harmony is taking to provide an error response and relevant EULA link: https://github.com/nasa/harmony/blob/1d80b2bae53a0fc8209056eb7205f91875150bb1/services/harmony/app/middleware/cmr-collection-reader.ts#L29-L58 |
Amazing! Thanks for tracking this down! |
We've identified two behaviors that make this user experience frustrating:
earthaccess.download()
, when it encounters a 403 due to a user not accepting EULA. @jessnicwelch showed a way to reproduce in this thread. When this error happens, we need to display a message like:Access to this data has been denied because it requires you to accept a End-User License Agreement (EULA). Follow this link to view and accept the EULA: https://{the rest of it}
. The URL we need to display should be contained in the 403 response data. This is what this ticket is about.earthaccess.download()
will continue after an error. New ticket for this:earthaccess.download()
ignores errors #581Original description:
If we get a 302 redirect for a particular dataset, see if we can detect if the reason is the lack of an EULA (NASA requires users to approve an EULA for some datasets) and explain what happened.
Currently, users can receive a confusing message:
The text was updated successfully, but these errors were encountered: