Skip to content

Commit

Permalink
feat: add new Runtime errors regarding IdentityMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
britsta committed Jan 9, 2025
1 parent 86ac257 commit 77c6780
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions _docs_integrate/data-model-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,7 @@ The parameters to accept a ReadAttributeRequestItem with a new Attribute.
## IdentityMetadata

An Integrator of a Connector should be able to store arbitrary auxiliary metadata related to an [Identity](#identity) within the Connector.
This Identity must be sufficiently familiar to them, which means that it must be a `peer` of a [Relationship]({% link _docs_integrate/data-model-overview.md %}#relationship) or their own Identity.
The common CRUD operations for handling IdentityMetadata are provided by different [use cases]({% link _docs_integrate/use-cases.md %}).
To be more precise, there is the [Upsert IdentityMetadata]({% link _docs_use-cases/use-case-consumption-upsert-identitymetadata.md %}) use case for creating and updating IdentityMetadata, as well as the [Get IdentityMetadata]({% link _docs_use-cases/use-case-consumption-get-identitymetadata.md %}) use case and the [Delete IdentityMetadata]({% link _docs_use-cases/use-case-consumption-delete-identitymetadata.md %}) use case.

Expand Down
2 changes: 2 additions & 0 deletions _docs_integrate/error-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ Please find a list of enmeshed error codes below. Most often the errors occur on
| {% include anchor a="error.runtime.identityDeletionProcess.activeIdentityDeletionProcessAlreadyExists" %} | There is already an active [IdentityDeletionProcess]({% link _docs_integrate/data-model-overview.md %}#identitydeletionprocess). You cannot start another, as there may only be one active IdentityDeletionProcess per [Identity]({% link _docs_integrate/data-model-overview.md %}#identity). |
| {% include anchor a="error.runtime.identityDeletionProcess.noApprovedIdentityDeletionProcess" %} | [No approved IdentityDeletionProcess was found]({% link _docs_use-cases/use-case-transport-get-active-identitydeletionprocess.md %}). |
| {% include anchor a="error.runtime.identityDeletionProcess.noWaitingForApprovalIdentityDeletionProcess" %} | No [IdentityDeletionProcess]({% link _docs_integrate/data-model-overview.md %}#identitydeletionprocess) waiting for decision was found. |
| {% include anchor a="error.runtime.identityMetadata.notFound" %} | There is no stored [IdentityMetadata]({% link _docs_integrate/data-model-overview.md %}#identitymetadata) for the specified combination of `reference` and `key`. |
| {% include anchor a="error.runtime.identityMetadata.unfamiliarReferencedIdentity" %} | The `reference` of the [IdentityMetadata]({% link _docs_integrate/data-model-overview.md %}#identitymetadata) resolves neither to the `address` of a `peer` of a [Relationship]({% link _docs_integrate/data-model-overview.md %}#relationship) nor the `address` of the own [Identity]({% link _docs_integrate/data-model-overview.md %}#identity). |
| {% include anchor a="error.runtime.invalidTokenContent" %} | The given [Token]({% link _docs_integrate/data-model-overview.md %}#token) has an invalid `content` for this [route]({% link _docs_use-cases/use-case-transport-create-own-token.md %}). |
| {% include anchor a="error.runtime.messages.hasNoActiveRelationship" %} | The [Message]({% link _docs_integrate/data-model-overview.md %}#message) cannot be sent, because there is no active [Relationship]({% link _docs_integrate/data-model-overview.md %}#relationship) to one or more of its `recipients`. However, please note that Messages whose `content` is a [Notification]({% link _docs_integrate/data-model-overview.md %}#notification) can still be sent on terminated Relationships. |
| {% include anchor a="error.runtime.messages.peerIsInDeletion" %} | The [Message]({% link _docs_integrate/data-model-overview.md %}#message) cannot be sent, because one or more of its `recipients` to which [Relationships]({% link _docs_integrate/data-model-overview.md %}#relationship) exist have `"ToBeDeleted"` as `peerDeletionInfo.deletionStatus` and the `content` of the Message is not a [Notification]({% link _docs_integrate/data-model-overview.md %}#notification). |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ api_route_regex: ^PUT /api/v2/IdentityMetadata$

[IdentityMetadata]({% link _docs_integrate/data-model-overview.md %}#identitymetadata) is used to store arbitrary auxiliary metadata related to an [Identity]({% link _docs_integrate/data-model-overview.md %}#identity) within the Connector.
This use case creates or updates an IdentityMetadata that relates to the Identity whose `address` is specified within the `reference` property of the IdentityMetadata.
IdentityMetadata may only be created or updated for a `peer` of a [Relationship]({% link _docs_integrate/data-model-overview.md %}#relationship) or the own Identity, in other words sufficiently familiar Identities.
If there is no IdentityMetadata for a given `reference` and `key` combination, a new IdentityMetadata is created.
Otherwise, the existing IdentityMetadata is updated with the new `value` provided.
Therefore, there can be at most one IdentityMetadata per `reference` and `key` combination.
Expand All @@ -61,6 +62,4 @@ In particular, there can be at most one IdentityMetadata without a `key` for eac

## On Failure

- The parameters are malformed.

<!-- TODO: Should a validation be added for case "The `reference` does not resolve to the `address` of a known Identity."? -->
- The `reference` resolves neither to the `address` of a `peer` of a [Relationship]({% link _docs_integrate/data-model-overview.md %}#relationship) nor the `address` of the own Identity.

0 comments on commit 77c6780

Please sign in to comment.