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 display of embargoed dandiset error page in GUI #2073

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

jjnesbitt
Copy link
Member

Fixes #1350
Follow on to #2060

It turns out the change I made to display "access denied" to embargoed dandisets didn't properly handle all cases of that access. This led to the display of "Dandiset does not exist" on dandisets that did exist, but were embargoed.

@jjnesbitt jjnesbitt added patch Increment the patch version when merged release Create a release when this pr is merged labels Nov 11, 2024
const data = await dandiRest.specificVersion(identifier, sanitizedVersion);
this.dandiset = data;
} catch (err) {
if (axios.isAxiosError(err) && err.response && err.response.status < 500) {
this.dandiset = null;

if (isUnauthenticatedOrForbidden(err)) {
this.meta.dandisetExistsAndEmbargoed = true;
Copy link
Member Author

Choose a reason for hiding this comment

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

@mvandenburgh I opted for this approach as functions like fetchDandiset are used in several other places in the client code base, and I didn't want to adversely affect behavior somewhere else by making a breaking change.

@jjnesbitt jjnesbitt merged commit 389364b into master Nov 13, 2024
4 checks passed
@jjnesbitt jjnesbitt deleted the fix-embargoed-gui-message branch November 13, 2024 20:10
@dandibot
Copy link
Member

🚀 PR was released in v0.3.110 🚀

@dandibot dandibot added the released This issue/pull request has been released. label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged release Create a release when this pr is merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

embargoed datasets should say that they are embargoed
3 participants