Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
NSeydoux committed Dec 13, 2024
1 parent 064172c commit be8e637
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/gConsent/discover/getAccessApiEndpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import type { UrlString } from "@inrupt/solid-client";
import { parse } from "auth-header";
import type { AccessBaseOptions } from "../type/AccessBaseOptions";
import { AccessGrantError } from "../../common/errors/AccessGrantError";
import { UmaError } from "../../common/errors/UmaError";

async function getAccessEndpointForResource(
resource: UrlString,
Expand Down
7 changes: 5 additions & 2 deletions src/gConsent/discover/getAccessManagementUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
import { getSessionFetch } from "../../common/util/getSessionFetch";
import type { AccessBaseOptions } from "../type/AccessBaseOptions";
import { PIM_STORAGE, PREFERRED_CONSENT_MANAGEMENT_UI } from "../constants";
import { AccessGrantError } from "../../common/errors/AccessGrantError";

interface AccessManagementUiFromProfile {
accessEndpoint?: UrlString;
Expand All @@ -48,12 +49,14 @@ async function getAccessManagementUiFromProfile(
fetch: options.fetch,
});
} catch (e) {
throw new Error(`Cannot get the Access Management UI for ${webId}: ${e}.`);
throw new AccessGrantError(
`Cannot get the Access Management UI for ${webId}: ${e}.`,
);
}

const profile = getThing(webIdDocument, webId);
if (profile === null) {
throw new Error(
throw new AccessGrantError(
`Cannot get the Access Management UI for ${webId}: the WebID cannot be dereferenced.`,
);
}
Expand Down

0 comments on commit be8e637

Please sign in to comment.