Skip to content

Commit

Permalink
fix: transport error instead of runtime error
Browse files Browse the repository at this point in the history
  • Loading branch information
britsta committed Dec 3, 2024
1 parent 9cf235c commit 115280a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions _docs_integrate/delete-identities.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ This is done via the `transport.peerToBeDeleted` [Connector event]({% link _docs
In addition, it is stored within the `peerDeletionInfo` property of the [Relationship]({% link _docs_integrate/data-model-overview.md %}#relationship) that the Identity currently has `"ToBeDeleted"` as `deletionStatus`.
If the Identity is finally deleted, the `deletionStatus` changes to `"Deleted"` and the `transport.peerDeleted` Connector event can be received.
Otherwise, if the Identity decides against its deletion within the grace period, the `peerDeletionInfo` of the Relationship is set back to `undefined` and the `transport.peerDeletionCancelledEvent` Connector event is triggered.
The deletion of an Identity has effects on [creating a new Relationship]({% link _docs_integrate/delete-identities.md %}#creation-of-new-relationships) to it, [sending Messages]({% link _docs_integrate/delete-identities.md %}#sending-messages) to it, [sending Requests to it and responding to Requests]({% link _docs_integrate/delete-identities.md %}#sending-and-responding-to-requests) from it.
The deletion of an Identity has effects on [creating a new Relationship]({% link _docs_integrate/delete-identities.md %}#creation-of-new-relationships) to it, [sending Messages]({% link _docs_integrate/delete-identities.md %}#sending-messages) to it, [sending Requests to it and responding to Requests from it]({% link _docs_integrate/delete-identities.md %}#sending-and-responding-to-requests).

### Creation of New Relationships

Expand All @@ -101,7 +101,7 @@ However, if the creator of the RelationshipTemplate is meanwhile in deletion or

An Identity is not permitted to [send a Message]({% link _docs_use-cases/use-case-transport-send-message-to-recipients.md %}) to a peer with which a Relationship has been established and which has already been deleted.
As long as the `content` of a [Message]({% link _docs_integrate/data-model-overview.md %}#message) is not a [Notification]({% link _docs_integrate/data-model-overview.md %}#notification), this also applies to a peer in deletion.
If the Identity tries to send a Message anyway to such a peer, an error with [error code]({% link _docs_integrate/error-codes.md %}) `error.transport.messages.peerIsInDeletion` or `error.transport.messages.peerIsDeleted` is thrown.
If the Identity tries to send a Message anyway to such a peer, an error with [error code]({% link _docs_integrate/error-codes.md %}) `error.runtime.messages.peerIsInDeletion` or `error.transport.messages.peerIsDeleted` is thrown.
Sent Messages whose `content` is a Notification cannot be received by a peer which is in deletion, but they are queued in case the peer cancels its deletion. After the peer has cancelled its deletion, it receives the queued Notifications.

### Sending and Responding to Requests
Expand Down
5 changes: 3 additions & 2 deletions _docs_integrate/error-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ Please find a list of enmeshed error codes below. Most often the errors occur on
| {% 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.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 be sent on terminated Relationships as well. |
| {% 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). |
| {% include anchor a="error.runtime.messages.fileNotFoundInMessage" %} | The requested [File]({% link _docs_integrate/data-model-overview.md %}#file) was not found in the given [Message]({% link _docs_integrate/data-model-overview.md %}#message). |
| {% include anchor a="error.runtime.notifications.cannotReceiveNotificationFromOwnMessage" %} | It is not possible to receive a [Notification]({% link _docs_integrate/data-model-overview.md %}#notification) from an own [Message]({% link _docs_integrate/data-model-overview.md %}#message). |
| {% include anchor a="error.runtime.notifications.cannotSaveSentNotificationFromPeerMessage" %} | The given [Message]({% link _docs_integrate/data-model-overview.md %}#message) was received from a peer, but an own Message is expected here to save its [Notification]({% link _docs_integrate/data-model-overview.md %}#notification) `content`. |
Expand Down Expand Up @@ -151,8 +153,7 @@ Please find a list of enmeshed error codes below. Most often the errors occur on
| {% include anchor a="error.transport.general.platformClientIdNotSet" %} | [The `platformClientId` was not set.]({% link _docs_operate/configuration.md %}#configuration-options). |
| {% include anchor a="error.transport.general.platformClientInvalid" %} | [The combination of `platformClientId` and `platformClientSecret` is invalid.]({% link _docs_operate/configuration.md %}#configuration-options) |
| {% include anchor a="error.transport.general.platformClientSecretNotSet" %} | [The `platformClientSecret` was not set.]({% link _docs_operate/configuration.md %}#configuration-options) |
| {% include anchor a="error.transport.messages.missingOrInactiveRelationship" %} | An active [Relationship]({% link _docs_integrate/data-model-overview.md %}#relationship) with the given `address` does not exist, consider ['Get Relationship']({% link _docs_use-cases/use-case-transport-get-relationship-by-address.md %}). |
| {% include anchor a="error.transport.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 Message's `content` is not a [Notification]({% link _docs_integrate/data-model-overview.md %}#notification). |
| {% include anchor a="error.transport.messages.hasNeitherActiveNorTerminatedRelationship" %} | The [Message]({% link _docs_integrate/data-model-overview.md %}#message) cannot be sent, because there is neither an active nor a terminated [Relationship]({% link _docs_integrate/data-model-overview.md %}#relationship) to one or more of its `recipients`. |
| {% include anchor a="error.transport.messages.peerIsDeleted" %} | 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 `"Deleted"` as `peerDeletionInfo.deletionStatus`. |
| {% include anchor a="error.transport.messages.ownAddressNotInList" %} | The `recipients` list of a [Message]({% link _docs_integrate/data-model-overview.md %}#message) didn't contain an entry for the own `address`. This Message should not have been received. |
| {% include anchor a="error.transport.messages.plaintextMismatch" %} | The own `address` was not named as a `recipient` within the signed MessagePlaintext. For example this can be caused by a replay attack. |
Expand Down

0 comments on commit 115280a

Please sign in to comment.