Skip to content

Gated Resource API changes#61441

Closed
alxhub wants to merge 5 commits intoangular:mainfrom
alxhub:resource-api-gated
Closed

Gated Resource API changes#61441
alxhub wants to merge 5 commits intoangular:mainfrom
alxhub:resource-api-gated

Conversation

@alxhub
Copy link
Copy Markdown
Member

@alxhub alxhub commented May 16, 2025

A copy of #60610 with a flag to allow the behavior to be patched out.

@angular-robot angular-robot bot added detected: breaking change PR contains a commit with a breaking change area: build & ci Related the build and CI infrastructure of the project area: core Issues related to the framework runtime labels May 16, 2025
@ngbot ngbot bot added this to the Backlog milestone May 16, 2025
@alxhub alxhub changed the title DNS: Gated Resource API changes Gated Resource API changes May 20, 2025
@alxhub alxhub added target: rc This PR is targeted for the next release-candidate merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels May 20, 2025
@alxhub
Copy link
Copy Markdown
Member Author

alxhub commented May 20, 2025

Caretaker: this needs an update to the g3 patch & a single client application: cl/760838126

Copy link
Copy Markdown
Member

@pkozlowski-opensource pkozlowski-opensource left a comment

Choose a reason for hiding this comment

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

LGTM

Reviewed-for: fw-general
Reviewed-for: public-api

@pkozlowski-opensource pkozlowski-opensource marked this pull request as ready for review May 20, 2025 10:39
@pullapprove pullapprove bot requested a review from josephperrott May 20, 2025 10:39
@pkozlowski-opensource pkozlowski-opensource added the action: review The PR is still awaiting reviews from at least one requested reviewer label May 20, 2025
@alxhub alxhub force-pushed the resource-api-gated branch 2 times, most recently from c60422e to 301e5ba Compare May 21, 2025 16:51
@alxhub alxhub force-pushed the resource-api-gated branch from 301e5ba to 99b2641 Compare May 21, 2025 17:29
@atscott atscott added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer detected: breaking change PR contains a commit with a breaking change labels May 21, 2025
Humberd added 4 commits May 21, 2025 12:02
Now only mutable resources can be reloaded.
`Resource.error` used to return `unknown`. Now it's `Error | undefined`.
For non-`Error` types they are encapsulated with the `Error` type.
…g undefined

When there is an underlying error state it would not be possible to swallow the error with:
`computed(() => res.value()?.inner);`
When the resource is loading after reloading from the error state reading `Resource.value()` would return the default value instead of throwing an error.
This change prevents `Resource.hasValue()` from throwing an error in such a case.
@alxhub alxhub force-pushed the resource-api-gated branch from 99b2641 to ad0346c Compare May 21, 2025 19:04
@atscott atscott closed this in 5762c23 May 21, 2025
@atscott
Copy link
Copy Markdown
Contributor

atscott commented May 21, 2025

This PR was merged into the repository by commit 905194f.

The changes were merged into the following branches: main, 20.0.x

atscott pushed a commit that referenced this pull request May 21, 2025
Now only mutable resources can be reloaded.

PR Close #61441
atscott pushed a commit that referenced this pull request May 21, 2025
`Resource.error` used to return `unknown`. Now it's `Error | undefined`.
For non-`Error` types they are encapsulated with the `Error` type.

PR Close #61441
atscott pushed a commit that referenced this pull request May 21, 2025
…g undefined (#61441)

When there is an underlying error state it would not be possible to swallow the error with:
`computed(() => res.value()?.inner);`

PR Close #61441
atscott pushed a commit that referenced this pull request May 21, 2025
…1441)

When the resource is loading after reloading from the error state reading `Resource.value()` would return the default value instead of throwing an error.
This change prevents `Resource.hasValue()` from throwing an error in such a case.

PR Close #61441
atscott pushed a commit that referenced this pull request May 21, 2025
atscott pushed a commit that referenced this pull request May 21, 2025
Now only mutable resources can be reloaded.

PR Close #61441
atscott pushed a commit that referenced this pull request May 21, 2025
`Resource.error` used to return `unknown`. Now it's `Error | undefined`.
For non-`Error` types they are encapsulated with the `Error` type.

PR Close #61441
atscott pushed a commit that referenced this pull request May 21, 2025
…g undefined (#61441)

When there is an underlying error state it would not be possible to swallow the error with:
`computed(() => res.value()?.inner);`

PR Close #61441
atscott pushed a commit that referenced this pull request May 21, 2025
…1441)

When the resource is loading after reloading from the error state reading `Resource.value()` would return the default value instead of throwing an error.
This change prevents `Resource.hasValue()` from throwing an error in such a case.

PR Close #61441
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project area: core Issues related to the framework runtime merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants