Repository navigation
fix(app-shell): a route whose object read the server answered shows the server reason, not "check your connection" - #29883
Merged
Conversation
…at the server said The by-name object read kept only the failed name, so a 5xx or a 404 with a code this build does not know drew "check your connection". getObjectSchema now keeps the transport error as the rewrap's cause; the provider stores the answer (answeredLoadFailure) beside the failed name and the route draws it. Claude-Session: https://claude.ai/code/session_01QsR2jTGjiGTnPZnatdavVb Co-Authored-By: Claude <noreply@anthropic.com>
…adapter Claude-Session: https://claude.ai/code/session_01QsR2jTGjiGTnPZnatdavVb Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTGjiGTnPZnatdavVb Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#2 · zhuangjianguo · session_01QsR2jRFuJz9QBZqPVHYVhJ 维护者速读
席位意见: 第一步实测推翻了卡片的前提:问题不只在 provider,适配器本身就把服务器的回答丢了。席位据此在编码前修订认领,加入 data-objectstack 的一处改动,并要求不改已导出的 席位核对 — ACCEPT ·
|
This was referenced Nov 3, 2026
Merged
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.
Requested by Steedos · project thread
Fixes #29728
Clause-②: no
Metadata-protocol: none
维护者速读
details.originalError,类、code、statusCode、message 都不变;网络中断和 403 仍显示原来的文案,重试行为不变。回滚即还原本 PR。ui/packages/data-objectstack/src/index.ts(getObjectSchema 的非 404 分支)、ui/packages/app-shell/src/providers/MetadataProvider.tsx(失败读取保存服务器回答)、ui/packages/app-shell/src/console/AppContent.tsx(RouteObjectReadFailed)。ui/下运行pnpm exec vitest run packages/app-shell/src/console/__tests__/AppContent.disabledPackageDeepLink-13052.test.tsx,预期 18 个用例全部通过,其中 503 用例显示 SERVICE_UNAVAILABLE 和服务器原文。What changes
On main, an app route whose by-name object read failed drew "Check your connection and try again" whatever happened: an answered 503, an answered 500, a 404 with a code this build does not know, a network drop and a 403 all drew the same sentence. Measured on
99c06965through the realObjectStackAdapterunder the realMetadataProviderandAppContent.The provider never saw the server's answer.
requestObjectSchemathrowsError{status, code, message}with the server's own code and sentence, butgetObjectSchema's non-404 catch rewrapped it withcreateErrorFromResponseand kept no reference to it. A 503 becameConnectionErrorCONNECTION_ERROR"Connection error: ...", a 500 becameUNKNOWN_ERROR, and a network drop got an invented status 500.@object-ui/data-objectstack:getObjectSchema's non-404 rewrap now carries the transport error asdetails.originalError, as its 404 arm (MetadataNotFoundError) and three other wrap sites in the package already do. The wrapper's class,code,statusCodeandmessageare unchanged, andcreateErrorFromResponsekeeps its signature.MetadataProvider:readObjectThroughAdapterunwrapsdetails.originalErrorfor anyObjectStackError(before, onlyMetadataNotFoundError). A failed by-name read storesansweredLoadFailure(err)beside the failed name, in a newanswersrecord on the scope entry. Nothing is stored for a refused read (forbidden/unauthorized), which keeps its state asPageViewdoes. The record is dropped when the name is answered or invalidated, and returned besidefailed/refused.appObjectScope:failedAnsweris the answer of the first failed name that has one. It is carried on the object, page and dashboard route paths.AppContent:RouteObjectReadFaileddrawsanswer.messagein place of the network sentence, plus a code chip (route-object-read-failed-code) inPageView's shape. No i18n rows were added, and Retry is unchanged.Tests
AppContent.disabledPackageDeepLink-13052.test.tsx: a new top-level describe over the REAL adapter driven by a fakefetch. It pins:RESOURCE_NOT_FOUNDandOBJECT_PACKAGE_DISABLEDkeep theirs;getObjectSchema.test.ts: a new describe pins the wrapper's class, code, statusCode and message, plusdetails.originalError, for a 503, a 500 and a network drop, and a 404 CONTROL.Ablations (committed head, ablation-replace.mjs, restored blob == HEAD)
MetadataNotFoundErroronly): 5 of 9 new route pins went red (503, 500, page 503, network CONTROL, retry-to-network). The unknown-404 pin stayed green, because a 404 is still unwrapped.answersrecord (if (answer && false)): 6 of 9 went red (503, 500, unknown-404, page 503, both Retry pins).Verification
appObjectScope/AppContent/MetadataProvider/route-object-read-failed(6 batches, all green), plus the whole data-objectstack suite (114 files, green).turbo run type-check --filter=@object-ui/app-shell --filter=@object-ui/data-objectstack: 66/66 tasks.dispatch-gates --commands): 36 derived, 36 run, all exit 0, reconciled with--ran(0 NOT-MEASURED), atff352f41. The headeffe42c8adds only a merge of one unrelated main commit (cloud-connection).2a886b17/ff352f41; the touched files are unchanged since.Acceptance notes
RESOURCE_NOT_FOUNDorOBJECT_PACKAGE_DISABLEDis now read by its code: an absence or a refusal, not a failure. No server path is known to answer that way.createErrorFromResponsestamps500on any error with no status. As a result, everygetObjectSchemacaller that reads the wrapper takes a network drop for an answered 500 (43 source files, 58 call sites underui/). This PR reads the cause instead and leaves the wrapper as it is.Generated by Claude Code