Say what "No pod URL found" actually means, and stop guessing wrong - #331
Merged
Conversation
Sentry has been collecting `Error: No pod URL found` from the packing list view. It comes from usePodSync: `getPrimaryPodUrl` returned null, so the hook threw a bare Error, view-packing-list's onSaveError handed the *string* to reportError, and the user was shown "Failed to save to Pod: No pod URL found". Three things were wrong with that. The null meant three different things. A signed-out session, a WebID profile we couldn't read this second, and an account that declares no storage at all are not the same problem — the first two are a moment, the third is a fact. `resolvePodUrl` now returns the reason alongside the URL, and `PodUrlUnavailableError` carries it to the callbacks. `getPrimaryPodUrl` keeps its old shape for the call sites that only want the URL. A momentary failure was the loudest thing in the app. The list view polls every five seconds, so a bad minute of network meant an error per tick; the save path turned the same condition into an exception in Sentry with only errorReporting's own frames for a stack, because it was given a string. Sync now skips a Pod it can't locate yet and lets the next poll pick it up, saves report through onSaveError with the error itself attached, and the page keeps a retryable one out of Sentry while still telling the user, in words, that the change is on this device only. An account with no storage declared reports as it always did — no later attempt fixes that one. And the lookup gave up early. A WebID profile is public by design, so when the authenticated read fails the token is the likeliest culprit: expired between check and request, a DPoP nonce race, a refresh still in flight. Retrying the same document unauthenticated costs one request in the only case where we would otherwise have given up — and giving up here does not just skip a poll, it drops a save. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeURbAVUoDvihv7cvqDkLE
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Sentry has been collecting
Error: No pod URL foundfrom the packing listview. It comes from usePodSync:
getPrimaryPodUrlreturned null, so the hookthrew a bare Error, view-packing-list's onSaveError handed the string to
reportError, and the user was shown "Failed to save to Pod: No pod URL found".
Three things were wrong with that.
The null meant three different things. A signed-out session, a WebID profile
we couldn't read this second, and an account that declares no storage at all
are not the same problem — the first two are a moment, the third is a fact.
resolvePodUrlnow returns the reason alongside the URL, andPodUrlUnavailableErrorcarries it to the callbacks.getPrimaryPodUrlkeepsits old shape for the call sites that only want the URL.
A momentary failure was the loudest thing in the app. The list view polls every
five seconds, so a bad minute of network meant an error per tick; the save path
turned the same condition into an exception in Sentry with only
errorReporting's own frames for a stack, because it was given a string. Sync
now skips a Pod it can't locate yet and lets the next poll pick it up, saves
report through onSaveError with the error itself attached, and the page keeps a
retryable one out of Sentry while still telling the user, in words, that the
change is on this device only. An account with no storage declared reports as
it always did — no later attempt fixes that one.
And the lookup gave up early. A WebID profile is public by design, so when the
authenticated read fails the token is the likeliest culprit: expired between
check and request, a DPoP nonce race, a refresh still in flight. Retrying the
same document unauthenticated costs one request in the only case where we would
otherwise have given up — and giving up here does not just skip a poll, it
drops a save.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01KeURbAVUoDvihv7cvqDkLE