Uh oh!
There was an error while loading. Please reload this page.
Make resource operation outcomes explicit - #44
Merged
Conversation
A resource read now returns the remote object, or undefined when the provider says it does not exist. Provider not-found exceptions are still translated at the provider boundary; they just become undefined there. Known temporary conditions - a Lambda that is still deploying, an IAM role that has not propagated - throw ResourceNotReadyError, recognised by its declared _tag rather than by class identity or message text. The reconciler decides what that means: deploy, read and mutation workflows retry it, while planning reports an indeterminate decision carrying the message. Everything else propagates. Drops the shared error-code matcher in favour of local checks at each provider boundary.
djgrant
marked this pull request as ready for review
July 27, 2026 16:32
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Jul 27, 2026
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 freeto 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.
This PR removes the error-name and error-message matchers from resources.
Resource error API
Import both errors from
@notation/resource:ResourceNotFoundErrorfromreadResourceOperationPendingErrorResourceNotFoundError
Only
readthrows this error. Adeletehandler must catch the provider's missing-resource error and return normally.ResourceOperationPendingError
retryAfterMsis required.callbackContextis optional plain data. The reconciler passes it as the final argument on the next call:The default limit is 30 calls.
maxOperationAttemptschanges the limit. A pending operation that reaches the limit fails.The reconciler does not guess that a missing read after create or update is temporary. The resource must throw
ResourceOperationPendingErrorif it knows the resource is still becoming visible.Other changes
ResourceNotReadyError, the matcher declarations, the old retry settings, and theindeterminateplan result.Tested with
pnpm build,pnpm typecheck, andpnpm test:once.