diff --git a/schemas/Error.json b/schemas/Error.json index 5956f2a..8164899 100644 --- a/schemas/Error.json +++ b/schemas/Error.json @@ -15,17 +15,18 @@ }, "name": { "type": "string", - "enum": [ - "UnknownError", - "OlmIndexError", - "OlmKeysNotSentError", - "OlmUnspecifiedError", - "VoipUserHangup", - "VoipIceFailed", - "VoipInviteTimeout", - "VoipIceTimeout", - "VoipUserMediaFailed", - "ToDeviceFailedToDecrypt" + "oneOf": [ + {"const": "OlmIndexError", "description": "E2EE domain error. The room key is known but is ratcheted (index > 0)."}, + {"const": "OlmKeysNotSentError", "description": "E2EE domain error. Generic unknown inbound group session error."}, + {"const": "OlmUnspecifiedError", "description": "E2EE domain error. Any other decryption error (missing field, format errors...)."}, + {"const": "UnknownError", "description": "E2EE domain error. Decryption failed due to unknown error."}, + {"const": "HistoricalMessage", "description": "E2EE domain error. Decryption failed for a message sent before the device logged in, and key backup is not enabled."}, + {"const": "VoipUserHangup", "description": "VOIP domain error. The user hung up the call."}, + {"const": "VoipIceFailed", "description": "VOIP domain error. ICE negotiation failed."}, + {"const": "VoipInviteTimeout", "description": "VOIP domain error. The call invite timed out."}, + {"const": "VoipIceTimeout", "description": "VOIP domain error. ICE negotiation timed out."}, + {"const": "VoipUserMediaFailed", "description": "VOIP domain error. The user's media failed to start."}, + {"const": "ToDeviceFailedToDecrypt", "description": "TO_DEVICE domain error. The to-device message failed to decrypt."} ] }, "context": { diff --git a/types/kotlin/Error.kt b/types/kotlin/Error.kt index e81a8da..f14cfaa 100644 --- a/types/kotlin/Error.kt +++ b/types/kotlin/Error.kt @@ -21,7 +21,7 @@ data class Error ( val domain: Domain, val eventName: EventName, - val name: Name, + val name: String, /** * UTDs can be permanent or temporary. If temporary, this field will contain the time it @@ -39,16 +39,3 @@ enum class Domain { enum class EventName { Error } - -enum class Name { - OlmIndexError, - OlmKeysNotSentError, - OlmUnspecifiedError, - ToDeviceFailedToDecrypt, - UnknownError, - VoipIceFailed, - VoipIceTimeout, - VoipInviteTimeout, - VoipUserHangup, - VoipUserMediaFailed -} diff --git a/types/kotlin2/Error.kt b/types/kotlin2/Error.kt index 48e16e5..77ce3f1 100644 --- a/types/kotlin2/Error.kt +++ b/types/kotlin2/Error.kt @@ -54,15 +54,63 @@ data class Error( } enum class Name { + + /** + * E2EE domain error. Decryption failed for a message sent before the + * device logged in, and key backup is not enabled. + */ + HistoricalMessage, + + /** + * E2EE domain error. The room key is known but is ratcheted (index > + * 0). + */ OlmIndexError, + + /** + * E2EE domain error. Generic unknown inbound group session error. + */ OlmKeysNotSentError, + + /** + * E2EE domain error. Any other decryption error (missing field, format + * errors...). + */ OlmUnspecifiedError, + + /** + * TO_DEVICE domain error. The to-device message failed to decrypt. + */ ToDeviceFailedToDecrypt, + + /** + * E2EE domain error. Decryption failed due to unknown error. + */ UnknownError, + + /** + * VOIP domain error. ICE negotiation failed. + */ VoipIceFailed, + + /** + * VOIP domain error. ICE negotiation timed out. + */ VoipIceTimeout, + + /** + * VOIP domain error. The call invite timed out. + */ VoipInviteTimeout, + + /** + * VOIP domain error. The user hung up the call. + */ VoipUserHangup, + + /** + * VOIP domain error. The user's media failed to start. + */ VoipUserMediaFailed, } diff --git a/types/swift/Error.swift b/types/swift/Error.swift index a00f4c3..fef8ded 100644 --- a/types/swift/Error.swift +++ b/types/swift/Error.swift @@ -51,15 +51,27 @@ extension AnalyticsEvent { } public enum Name: String { + /// E2EE domain error. Decryption failed for a message sent before the device logged in, and key backup is not enabled. + case HistoricalMessage + /// E2EE domain error. The room key is known but is ratcheted (index > 0). case OlmIndexError + /// E2EE domain error. Generic unknown inbound group session error. case OlmKeysNotSentError + /// E2EE domain error. Any other decryption error (missing field, format errors...). case OlmUnspecifiedError + /// TO_DEVICE domain error. The to-device message failed to decrypt. case ToDeviceFailedToDecrypt + /// E2EE domain error. Decryption failed due to unknown error. case UnknownError + /// VOIP domain error. ICE negotiation failed. case VoipIceFailed + /// VOIP domain error. ICE negotiation timed out. case VoipIceTimeout + /// VOIP domain error. The call invite timed out. case VoipInviteTimeout + /// VOIP domain error. The user hung up the call. case VoipUserHangup + /// VOIP domain error. The user's media failed to start. case VoipUserMediaFailed }