fix 403 error - #759
Open
SharonStrats wants to merge 3 commits into
Open
Conversation
…@5.0.0-1 pane-registry@5.0.0-0 activitystreams-pane@2.0.0-0 chat-pane@4.0.0-0 contacts-pane@4.0.0-0 folder-pane@4.0.0-0 issue-pane@4.0.0-0 meeting-pane@4.0.0-0 profile-pane@4.0.0-0 source-pane@4.0.0-0) (latest: rdflib@2.4.0)
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new fallback introduces inconsistent use of DEFAULT_PROFILE_PATH, misleading indentation, and an inaccurate error message that can hinder debugging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR adjusts WebID/profile resolution logic to avoid relying on a “default profile at pod root” assumption (likely related to the reported 403), and introduces a new fallback that tries loading the root-origin profile card.
Changes:
- Removes the initial “pod root + DEFAULT_PROFILE_PATH” load attempt from both
loadProfileFromURIandgetNameOfPodOwner. - Adds a new fallback that tries
${origin}/profile/card#mewhen there is no first path segment to derive a prefixed pod from.
File summaries
| File | Description |
|---|---|
| src/utils/webIdUtils.ts | Updates WebID/profile discovery fallbacks to prefer derived or origin-root profile card loading. |
Review details
Suppressed comments (1)
src/utils/webIdUtils.ts:85
- This catch covers failures from both the derived-profile attempt and the new
rootWebIdfallback, but the log message still says "failed on derived profile". Updating the message avoids misleading diagnostics when the root-profile load is what fails.
return getName(store, rootWebId)
} catch (err) {
if (!isFetchErrorStatus(err, 403)) {
console.error('getNameOfPodOwner failed on derived profile:', err)
}
- Files reviewed: 1/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+27
to
+29
| const rootWebId = sym(`${uriUrl.origin}/profile/card#me`) | ||
| await store.fetcher.load(rootWebId) | ||
| return rootWebId |
Comment on lines
+79
to
+81
| const rootWebId = sym(`${uriUrl.origin}/profile/card#me`) | ||
| await store.fetcher.load(rootWebId) | ||
| return getName(store, rootWebId) |
…@5.0.0-1 pane-registry@5.0.0-0 activitystreams-pane@2.0.0-0 chat-pane@4.0.0-0 contacts-pane@4.0.0-0 folder-pane@4.0.0-0 issue-pane@4.0.0-0 meeting-pane@4.0.0-0 profile-pane@4.0.0-0 source-pane@4.0.0-0) (latest: rdflib@2.4.0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I just confirmed this is no longer needed to fix the PATCH issue, but it does remove the 403 errors.
Want to speak to Timea first about this.