Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data DynError = DynError {}
- dynError :: forall e. KnownError e => DynError
- dynErrorToWai :: DynError -> Error
- data StaticError = StaticError {}
- class KnownError (e :: StaticError)
- type family MapError (e :: k) :: StaticError
- errorToResponse :: forall e. KnownError (MapError e) => JSONResponse
- errorToWai :: forall e. KnownError (MapError e) => Error
- class APIError e where
- toResponse :: e -> JSONResponse
- data CanThrow e
- data CanThrowMany (es :: [k])
- type family DeclaredErrorEffects api :: EffectRow where ...
- addErrorResponseToSwagger :: Int -> Response -> OpenApi -> OpenApi
- addStaticErrorToSwagger :: forall e. (Typeable e, KnownError e) => OpenApi -> OpenApi
- class IsSwaggerError e where
- addToOpenApi :: OpenApi -> OpenApi
- data ErrorResponse e
- type family ErrorEffect (e :: k) :: Effect
- type ErrorS e = Error (Tagged e ())
- throwS :: forall e r a. Member (ErrorS e) r => Sem r a
- noteS :: forall e r a. Member (ErrorS e) r => Maybe a -> Sem r a
- mapErrorS :: forall e e' r a. Member (ErrorS e') r => Sem (ErrorS e ': r) a -> Sem r a
- runErrorS :: forall e r a. Sem (ErrorS e : r) a -> Sem r (Maybe a)
- mapToRuntimeError :: forall e e' r a. Member (Error e') r => e' -> Sem (ErrorS e ': r) a -> Sem r a
- mapToDynamicError :: forall e r a. (Member (Error DynError) r, KnownError (MapError e)) => Sem (ErrorS e ': r) a -> Sem r a
Static and dynamic error types
Runtime representation of a statically-known error.
dynError :: forall e. KnownError e => DynError Source #
dynErrorToWai :: DynError -> Error Source #
data StaticError Source #
A statically-known error. This is meant to be used as a kind.
class KnownError (e :: StaticError) Source #
seSing
Instances
(KnownNat c, KnownSymbol l, KnownSymbol msg) => KnownError ('StaticError c l msg) Source # | |
Defined in Wire.API.Error seSing :: SStaticError ('StaticError c l msg) |
type family MapError (e :: k) :: StaticError Source #
Instances
type MapError 'AccessDenied Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'AccountEphemeral Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'AccountPending Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'AccountSuspended Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'AllowlistError Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'BadCredentials Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'BlacklistedEmail Source # | |
Defined in Wire.API.Error.Brig type MapError 'BlacklistedEmail = 'StaticError 403 "blacklisted-email" "The given e-mail address has been blacklisted due to a permanent bounce or a complaint." | |
type MapError 'CannotJoinMultipleTeams Source # | |
Defined in Wire.API.Error.Brig type MapError 'CannotJoinMultipleTeams = 'StaticError 403 "cannot-join-multiple-teams" "Cannot accept invitations from multiple teams" | |
type MapError 'ChangePasswordMustDiffer Source # | |
Defined in Wire.API.Error.Brig type MapError 'ChangePasswordMustDiffer = 'StaticError 409 "password-must-differ" "For password change, new and old password must be different." | |
type MapError 'ClientNotFound Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'CodeAuthenticationFailed Source # | |
Defined in Wire.API.Error.Brig type MapError 'CodeAuthenticationFailed = 'StaticError 403 "code-authentication-failed" "Code authentication failed" | |
type MapError 'CodeAuthenticationRequired Source # | |
Defined in Wire.API.Error.Brig type MapError 'CodeAuthenticationRequired = 'StaticError 403 "code-authentication-required" "Code authentication is required" | |
type MapError 'ConflictingInvitations Source # | |
Defined in Wire.API.Error.Brig type MapError 'ConflictingInvitations = 'StaticError 409 "conflicting-invitations" "Multiple conflicting invitations to different teams exists." | |
type MapError 'ConnectionLimitReached Source # | |
Defined in Wire.API.Error.Brig type MapError 'ConnectionLimitReached = 'StaticError 403 "connection-limit" "Too many sent/accepted connections" | |
type MapError 'CustomerExtensionBlockedDomain Source # | |
Defined in Wire.API.Error.Brig type MapError 'CustomerExtensionBlockedDomain = 'StaticError 451 "domain-blocked-for-registration" "[Customer extension] the email domain example.com that you are attempting to register a user with has been blocked for creating wire users. Please contact your IT department." | |
type MapError 'DeleteCodePending Source # | |
Defined in Wire.API.Error.Brig type MapError 'DeleteCodePending = 'StaticError 403 "pending-delete" "A verification code for account deletion is still pending" | |
type MapError 'EmailExists Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'HandleExists Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'HandleManagedByScim Source # | |
Defined in Wire.API.Error.Brig type MapError 'HandleManagedByScim = 'StaticError 403 "managed-by-scim" "Updating handle is not allowed, because it is managed by SCIM, or E2EId is enabled" | |
type MapError 'HandleNotFound Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'InsufficientTeamPermissions Source # | |
Defined in Wire.API.Error.Brig type MapError 'InsufficientTeamPermissions = 'StaticError 403 "insufficient-permissions" "Insufficient team permissions" | |
type MapError 'InvalidActivationCodeWrongCode Source # | |
Defined in Wire.API.Error.Brig type MapError 'InvalidActivationCodeWrongCode = 'StaticError 404 "invalid-code" "Invalid activation code" | |
type MapError 'InvalidActivationCodeWrongUser Source # | |
Defined in Wire.API.Error.Brig type MapError 'InvalidActivationCodeWrongUser = 'StaticError 404 "invalid-code" "User does not exist" | |
type MapError 'InvalidBot Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'InvalidCode Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'InvalidConversation Source # | |
Defined in Wire.API.Error.Brig type MapError 'InvalidConversation = 'StaticError 403 "invalid-conversation" "The operation is not allowed in this conversation." | |
type MapError 'InvalidEmail Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'InvalidHandle Source # | |
Defined in Wire.API.Error.Brig type MapError 'InvalidHandle = 'StaticError 400 "invalid-handle" "The given handle is invalid (less than 2 or more than 256 characters; chars not in \"a-z0-9_.-\"; or on the blocklist)" | |
type MapError 'InvalidInvitationCode Source # | |
Defined in Wire.API.Error.Brig type MapError 'InvalidInvitationCode = 'StaticError 400 "invalid-invitation-code" "Invalid invitation code." | |
type MapError 'InvalidKeyPackageRef Source # | |
Defined in Wire.API.Error.Brig type MapError 'InvalidKeyPackageRef = 'StaticError 409 "invalid-reference" "Key package's reference does not match its data" | |
type MapError 'InvalidPasswordResetCode Source # | |
Defined in Wire.API.Error.Brig type MapError 'InvalidPasswordResetCode = 'StaticError 400 "invalid-code" "Invalid password reset code." | |
type MapError 'InvalidPasswordResetKey Source # | |
Defined in Wire.API.Error.Brig type MapError 'InvalidPasswordResetKey = 'StaticError 400 "invalid-key" "Invalid email or mobile number for password reset." | |
type MapError 'InvalidPhone Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'InvalidProvider Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'InvalidServiceKey Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'InvalidTransition Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'InvalidUser Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'KeyPackageDecodingError Source # | |
Defined in Wire.API.Error.Brig type MapError 'KeyPackageDecodingError = 'StaticError 409 "decoding-error" "Key package could not be TLS-decoded" | |
type MapError 'LastIdentity Source # | |
Defined in Wire.API.Error.Brig type MapError 'LastIdentity = 'StaticError 403 "last-identity" "The last user identity cannot be removed." | |
type MapError 'LocaleManagedByScim Source # | |
Defined in Wire.API.Error.Brig type MapError 'LocaleManagedByScim = 'StaticError 403 "managed-by-scim" "Updating locale is not allowed, because it is managed by SCIM, or E2EId is enabled" | |
type MapError 'MLSDuplicatePublicKey Source # | |
Defined in Wire.API.Error.Brig type MapError 'MLSDuplicatePublicKey = 'StaticError 400 "mls-duplicate-public-key" "MLS public key for the given signature scheme already exists" | |
type MapError 'MLSIdentityMismatch Source # | |
Defined in Wire.API.Error.Brig type MapError 'MLSIdentityMismatch = 'StaticError 403 "mls-identity-mismatch" "Key package credential does not match qualified client ID" | |
type MapError 'MLSNotEnabled Source # | |
Defined in Wire.API.Error.Brig type MapError 'MLSNotEnabled = 'StaticError 400 "mls-not-enabled" "MLS is not configured on this backend. See docs.wire.com for instructions on how to enable it" | |
type MapError 'MLSProtocolError Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'MLSServicesNotAllowed Source # | |
Defined in Wire.API.Error.Brig type MapError 'MLSServicesNotAllowed = 'StaticError 409 "mls-services-not-allowed" "Services not allowed in MLS" | |
type MapError 'MalformedPrekeys Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'MissingAuth Source # | |
Defined in Wire.API.Error.Brig type MapError 'MissingAuth = 'StaticError 403 "missing-auth" "Re-authentication via password required" | |
type MapError 'MissingIdentity Source # | |
Defined in Wire.API.Error.Brig type MapError 'MissingIdentity = 'StaticError 403 "missing-identity" "Using an invitation code requires registering the given email." | |
type MapError 'MissingLegalholdConsent Source # | |
Defined in Wire.API.Error.Brig type MapError 'MissingLegalholdConsent = 'StaticError 403 "missing-legalhold-consent" "Failed to connect to a user or to invite a user to a group because somebody is under legalhold and somebody else has not granted consent" | |
type MapError 'MissingLegalholdConsentOldClients Source # | |
Defined in Wire.API.Error.Brig type MapError 'MissingLegalholdConsentOldClients = 'StaticError 403 "missing-legalhold-consent-old-clients" "Failed to connect to a user or to invite a user to a group because somebody is under legalhold and somebody else has old clients that do not support legalhold's UI requirements" | |
type MapError 'NameManagedByScim Source # | |
Defined in Wire.API.Error.Brig type MapError 'NameManagedByScim = 'StaticError 403 "managed-by-scim" "Updating name is not allowed, because it is managed by SCIM, or E2EId is enabled" | |
type MapError 'NoEmail Source # | |
Defined in Wire.API.Error.Brig type MapError 'NoEmail = 'StaticError 403 "no-email" "This operation requires the user to have a verified email address." | |
type MapError 'NoIdentity Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'NoPassword Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'NotConnected Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'NotificationNotFound Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'OwnerDeletingSelf Source # | |
Defined in Wire.API.Error.Brig type MapError 'OwnerDeletingSelf = 'StaticError 403 "no-self-delete-for-team-owner" "Team owners are not allowed to delete themselves; ask a fellow owner" | |
type MapError 'PasswordExists Source # | |
Defined in Wire.API.Error.Brig type MapError 'PasswordExists = 'StaticError 403 "password-exists" "The operation is not permitted because the user has a password set" | |
type MapError 'PasswordIsStale Source # | |
Defined in Wire.API.Error.Brig type MapError 'PasswordIsStale = 'StaticError 403 "password-is-stale" "The password is too old, please update your password." | |
type MapError 'PasswordResetInProgress Source # | |
Defined in Wire.API.Error.Brig type MapError 'PasswordResetInProgress = 'StaticError 409 "code-exists" "A password reset is already in progress." | |
type MapError 'PendingInvitationNotFound Source # | |
Defined in Wire.API.Error.Brig type MapError 'PendingInvitationNotFound = 'StaticError 404 "not-found" "No pending invitations exists." | |
type MapError 'PropertyKeyTooLarge Source # | |
Defined in Wire.API.Error.Brig type MapError 'PropertyKeyTooLarge = 'StaticError 403 "property-key-too-large" "The property key is too large." | |
type MapError 'PropertyValueTooLarge Source # | |
Defined in Wire.API.Error.Brig type MapError 'PropertyValueTooLarge = 'StaticError 403 "property-value-too-large" "The property value is too large" | |
type MapError 'ProviderNotFound Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'ResetPasswordMustDiffer Source # | |
Defined in Wire.API.Error.Brig type MapError 'ResetPasswordMustDiffer = 'StaticError 409 "password-must-differ" "For password reset, new and old password must be different." | |
type MapError 'ServiceDisabled Source # | |
Defined in Wire.API.Error.Brig type MapError 'ServiceDisabled = 'StaticError 403 "service-disabled" "The desired service is currently disabled." | |
type MapError 'ServiceNotFound Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'TeamsNotFederating Source # | |
Defined in Wire.API.Error.Brig type MapError 'TeamsNotFederating = 'StaticError 403 "team-not-federating" "The target user is owned by a federated backend, but is not in an allow-listed team" | |
type MapError 'TooManyClients Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'TooManyConversationMembers Source # | |
Defined in Wire.API.Error.Brig type MapError 'TooManyConversationMembers = 'StaticError 403 "too-many-members" "Maximum number of members per conversation reached." | |
type MapError 'TooManyProperties Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'TooManyTeamInvitations Source # | |
Defined in Wire.API.Error.Brig type MapError 'TooManyTeamInvitations = 'StaticError 403 "too-many-team-invitations" "Too many team invitations for this team" | |
type MapError 'TooManyTeamMembers Source # | |
Defined in Wire.API.Error.Brig type MapError 'TooManyTeamMembers = 'StaticError 403 "too-many-team-members" "Too many members in this team." | |
type MapError 'UnknownClient Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'UserAlreadyInATeam Source # | |
Defined in Wire.API.Error.Brig type MapError 'UserAlreadyInATeam = 'StaticError 403 "user-already-in-a-team" "Switching teams is not allowed" | |
type MapError 'UserCreationRestricted Source # | docsreferenceuser/registration.md {#RefRestrictRegistration}. |
Defined in Wire.API.Error.Brig type MapError 'UserCreationRestricted = 'StaticError 403 "user-creation-restricted" "This instance does not allow creation of personal users or teams." | |
type MapError 'UserKeyExists Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'UserNotFound Source # | |
Defined in Wire.API.Error.Brig | |
type MapError 'VerificationCodeThrottled Source # | |
Defined in Wire.API.Error.Brig type MapError 'VerificationCodeThrottled = 'StaticError 429 "too-many-requests" "Too many request to generate a verification code." | |
type MapError 'ClientGone Source # | |
Defined in Wire.API.Error.Cannon | |
type MapError 'PresenceNotRegistered Source # | |
Defined in Wire.API.Error.Cannon | |
type MapError 'AssetNotFound Source # | |
Defined in Wire.API.Error.Cargohold | |
type MapError 'AssetTooLarge Source # | |
Defined in Wire.API.Error.Cargohold | |
type MapError 'InvalidLength Source # | |
Defined in Wire.API.Error.Cargohold | |
type MapError 'NoMatchingAssetEndpoint Source # | Return |
Defined in Wire.API.Error.Cargohold | |
type MapError 'Unauthorised Source # | |
Defined in Wire.API.Error.Cargohold | |
type MapError 'UnverifiedUser Source # | |
Defined in Wire.API.Error.Cargohold | |
type MapError 'UserNotFound Source # | |
Defined in Wire.API.Error.Cargohold | |
type MapError 'ReAuthFailed Source # | |
Defined in Wire.API.Error.Galley type MapError 'ReAuthFailed = 'StaticError 403 "access-denied" "This operation requires reauthentication" | |
type MapError 'VerificationCodeAuthFailed Source # | |
Defined in Wire.API.Error.Galley type MapError 'VerificationCodeAuthFailed = 'StaticError 403 "code-authentication-failed" "Code authentication failed" | |
type MapError 'VerificationCodeRequired Source # | |
Defined in Wire.API.Error.Galley type MapError 'VerificationCodeRequired = 'StaticError 403 "code-authentication-required" "Verification code required" | |
type MapError 'AccessDenied Source # | |
Defined in Wire.API.Error.Galley type MapError 'AccessDenied = 'StaticError 403 "access-denied" "You do not have permission to access this resource" | |
type MapError 'BroadcastLimitExceeded Source # | |
Defined in Wire.API.Error.Galley type MapError 'BroadcastLimitExceeded = 'StaticError 400 "too-many-users-to-broadcast" "Too many users to fan out the broadcast event to" | |
type MapError 'BulkGetMemberLimitExceeded Source # | |
Defined in Wire.API.Error.Galley type MapError 'BulkGetMemberLimitExceeded = 'StaticError 400 "too-many-uids" (AppendSymbol (AppendSymbol "Can only process " (Show_ HardTruncationLimit)) " user ids per request.") | |
type MapError 'CannotEnableLegalHoldServiceLargeTeam Source # | |
Defined in Wire.API.Error.Galley type MapError 'CannotEnableLegalHoldServiceLargeTeam = 'StaticError 403 "too-large-team-for-legalhold" "Cannot enable legalhold on large teams (reason: for removing LH from team, we need to iterate over all members, which is only supported for teams with less than 2k members)" | |
type MapError 'CodeNotFound Source # | |
Defined in Wire.API.Error.Galley | |
type MapError 'ConvAccessDenied Source # | |
Defined in Wire.API.Error.Galley | |
type MapError 'ConvInvalidProtocolTransition Source # | |
Defined in Wire.API.Error.Galley type MapError 'ConvInvalidProtocolTransition = 'StaticError 403 "invalid-protocol-transition" "Protocol transition is invalid" | |
type MapError 'ConvMemberNotFound Source # | |
Defined in Wire.API.Error.Galley type MapError 'ConvMemberNotFound = 'StaticError 404 "no-conversation-member" "Conversation member not found" | |
type MapError 'ConvNotFound Source # | |
Defined in Wire.API.Error.Galley | |
type MapError 'CreateConversationCodeConflict Source # | |
Defined in Wire.API.Error.Galley type MapError 'CreateConversationCodeConflict = 'StaticError 409 "create-conv-code-conflict" "Conversation code already exists with a different password setting than the requested one." | |
type MapError 'CustomBackendNotFound Source # | |
Defined in Wire.API.Error.Galley type MapError 'CustomBackendNotFound = 'StaticError 404 "custom-backend-not-found" "Custom backend not found" | |
type MapError 'DeleteQueueFull Source # | |
Defined in Wire.API.Error.Galley type MapError 'DeleteQueueFull = 'StaticError 503 "queue-full" "The delete queue is full; no further delete requests can be processed at the moment" | |
type MapError 'GuestLinksDisabled Source # | |
Defined in Wire.API.Error.Galley type MapError 'GuestLinksDisabled = 'StaticError 409 "guest-links-disabled" "The guest link feature is disabled and all guest links have been revoked" | |
type MapError 'InvalidAction Source # | |
Defined in Wire.API.Error.Galley type MapError 'InvalidAction = 'StaticError 400 "invalid-actions" "The specified actions are invalid" | |
type MapError 'InvalidConversationPassword Source # | |
Defined in Wire.API.Error.Galley type MapError 'InvalidConversationPassword = 'StaticError 403 "invalid-conversation-password" "Invalid conversation password" | |
type MapError 'InvalidOperation Source # | |
Defined in Wire.API.Error.Galley | |
type MapError 'InvalidPermissions Source # | |
Defined in Wire.API.Error.Galley type MapError 'InvalidPermissions = 'StaticError 403 "invalid-permissions" "The specified permissions are invalid" | |
type MapError 'InvalidTarget Source # | |
Defined in Wire.API.Error.Galley | |
type MapError 'InvalidTargetAccess Source # | |
Defined in Wire.API.Error.Galley | |
type MapError 'InvalidTeamNotificationId Source # | |
Defined in Wire.API.Error.Galley type MapError 'InvalidTeamNotificationId = 'StaticError 400 "invalid-notification-id" "Could not parse notification id (must be UUIDv1)." | |
type MapError 'InvalidTeamStatusUpdate Source # | |
Defined in Wire.API.Error.Galley type MapError 'InvalidTeamStatusUpdate = 'StaticError 403 "invalid-team-status-update" "Cannot use this endpoint to update the team to the given status." | |
type MapError 'LegalHoldCouldNotBlockConnections Source # | |
Defined in Wire.API.Error.Galley type MapError 'LegalHoldCouldNotBlockConnections = 'StaticError 500 "legalhold-internal" "legal hold service: could not block connections when resolving policy conflicts." | |
type MapError 'LegalHoldDisableUnimplemented Source # | |
Defined in Wire.API.Error.Galley type MapError 'LegalHoldDisableUnimplemented = 'StaticError 403 "legalhold-disable-unimplemented" "legal hold cannot be disabled for whitelisted teams" | |
type MapError 'LegalHoldNotEnabled Source # | |
Defined in Wire.API.Error.Galley type MapError 'LegalHoldNotEnabled = 'StaticError 403 "legalhold-not-enabled" "legal hold is not enabled for this team" | |
type MapError 'LegalHoldServiceBadResponse Source # | |
Defined in Wire.API.Error.Galley type MapError 'LegalHoldServiceBadResponse = 'StaticError 400 "legalhold-status-bad" "legal hold service: invalid response" | |
type MapError 'LegalHoldServiceInvalidKey Source # | |
Defined in Wire.API.Error.Galley type MapError 'LegalHoldServiceInvalidKey = 'StaticError 400 "legalhold-invalid-key" "legal hold service pubkey is invalid" | |
type MapError 'LegalHoldServiceNotRegistered Source # | |
Defined in Wire.API.Error.Galley type MapError 'LegalHoldServiceNotRegistered = 'StaticError 400 "legalhold-not-registered" "legal hold service has not been registered for this team" | |
type MapError 'MLSClientMismatch Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSClientMismatch = 'StaticError 409 "mls-client-mismatch" "A proposal of type Add or Remove does not apply to the full list of clients for a user" | |
type MapError 'MLSClientSenderUserMismatch Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSClientSenderUserMismatch = 'StaticError 400 "mls-client-sender-user-mismatch" "User ID resolved from Client ID does not match message's sender user ID" | |
type MapError 'MLSCommitMissingReferences Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSCommitMissingReferences = 'StaticError 400 "mls-commit-missing-references" "The commit is not referencing all pending proposals" | |
type MapError 'MLSDuplicatePublicKey Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSDuplicatePublicKey = 'StaticError 400 "mls-duplicate-public-key" "MLS public key for the given signature scheme already exists" | |
type MapError 'MLSFederatedOne2OneNotSupported Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSFederatedOne2OneNotSupported = 'StaticError 400 "mls-federated-one2one-not-supported" "Federated One2One MLS conversations are only supported in API version >= 6" | |
type MapError 'MLSGroupConversationMismatch Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSGroupConversationMismatch = 'StaticError 400 "mls-group-conversation-mismatch" "Conversation ID resolved from Group ID does not match submitted Conversation ID" | |
type MapError 'MLSInvalidLeafNodeIndex Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSInvalidLeafNodeIndex = 'StaticError 400 "mls-invalid-leaf-node-index" "A referenced leaf node index points to a blank or non-existing node" | |
type MapError 'MLSLegalholdIncompatible Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSLegalholdIncompatible = 'StaticError 409 "mls-legal-hold-not-allowed" "A user who is under legal-hold may not participate in MLS conversations" | |
type MapError 'MLSMigrationCriteriaNotSatisfied Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSMigrationCriteriaNotSatisfied = 'StaticError 400 "mls-migration-criteria-not-satisfied" "The migration criteria for mixed to MLS protocol transition are not satisfied for this conversation" | |
type MapError 'MLSMissingGroupInfo Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSMissingGroupInfo = 'StaticError 404 "mls-missing-group-info" "The conversation has no group information" | |
type MapError 'MLSNonEmptyMemberList Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSNonEmptyMemberList = 'StaticError 400 "non-empty-member-list" "Attempting to add group members outside MLS" | |
type MapError 'MLSNotEnabled Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSNotEnabled = 'StaticError 400 "mls-not-enabled" "MLS is not configured on this backend. See docs.wire.com for instructions on how to enable it" | |
type MapError 'MLSProposalNotFound Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSProposalNotFound = 'StaticError 404 "mls-proposal-not-found" "A proposal referenced in a commit message could not be found" | |
type MapError 'MLSProtocolErrorTag Source # | |
Defined in Wire.API.Error.Galley | |
type MapError 'MLSSelfRemovalNotAllowed Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSSelfRemovalNotAllowed = 'StaticError 400 "mls-self-removal-not-allowed" "Self removal from group is not allowed" | |
type MapError 'MLSStaleMessage Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSStaleMessage = 'StaticError 409 "mls-stale-message" "The conversation epoch in a message is too old" | |
type MapError 'MLSSubConvClientNotInParent Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSSubConvClientNotInParent = 'StaticError 403 "mls-subconv-join-parent-missing" "MLS client cannot join the subconversation because it is not member of the parent conversation" | |
type MapError 'MLSSubConvUnsupportedConvType Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSSubConvUnsupportedConvType = 'StaticError 403 "mls-subconv-unsupported-convtype" "MLS subconversations are only supported for regular conversations" | |
type MapError 'MLSUnsupportedMessage Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSUnsupportedMessage = 'StaticError 422 "mls-unsupported-message" "Attempted to send a message with an unsupported combination of content type and wire format" | |
type MapError 'MLSUnsupportedProposal Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSUnsupportedProposal = 'StaticError 422 "mls-unsupported-proposal" "Unsupported proposal type" | |
type MapError 'MLSWelcomeMismatch Source # | |
Defined in Wire.API.Error.Galley type MapError 'MLSWelcomeMismatch = 'StaticError 400 "mls-welcome-mismatch" "The list of targets of a welcome message does not match the list of new clients in a group" | |
type MapError 'MissingLegalholdConsent Source # | |
Defined in Wire.API.Error.Galley type MapError 'MissingLegalholdConsent = 'StaticError 403 "missing-legalhold-consent" "Failed to connect to a user or to invite a user to a group because somebody is under legalhold and somebody else has not granted consent" | |
type MapError 'MissingLegalholdConsentOldClients Source # | |
Defined in Wire.API.Error.Galley type MapError 'MissingLegalholdConsentOldClients = 'StaticError 403 "missing-legalhold-consent-old-clients" "Failed to connect to a user or to invite a user to a group because somebody is under legalhold and somebody else has old clients that do not support legalhold's UI requirements" | |
type MapError 'NoAddToBinding Source # | |
Defined in Wire.API.Error.Galley type MapError 'NoAddToBinding = 'StaticError 403 "binding-team" "Cannot add users to binding teams, invite only" | |
type MapError 'NoBindingTeam Source # | |
Defined in Wire.API.Error.Galley type MapError 'NoBindingTeam = 'StaticError 403 "no-binding-team" "Operation allowed only on binding teams" | |
type MapError 'NoBindingTeamMembers Source # | |
Defined in Wire.API.Error.Galley type MapError 'NoBindingTeamMembers = 'StaticError 403 "non-binding-team-members" "Both users must be members of the same binding team" | |
type MapError 'NoLegalHoldDeviceAllocated Source # | |
Defined in Wire.API.Error.Galley type MapError 'NoLegalHoldDeviceAllocated = 'StaticError 404 "legalhold-no-device-allocated" "no legal hold device is registered for this user. POST /teams/:tid/legalhold/:uid/ to start the flow." | |
type MapError 'NoUserLegalHoldConsent Source # | |
Defined in Wire.API.Error.Galley type MapError 'NoUserLegalHoldConsent = 'StaticError 409 "legalhold-no-consent" "user has not given consent to using legal hold" | |
type MapError 'NonBindingTeam Source # | |
Defined in Wire.API.Error.Galley type MapError 'NonBindingTeam = 'StaticError 404 "non-binding-team" "Not a member of a binding team" | |
type MapError 'NotAOneMemberTeam Source # | |
Defined in Wire.API.Error.Galley type MapError 'NotAOneMemberTeam = 'StaticError 403 "not-one-member-team" "Can only delete teams with a single member" | |
type MapError 'NotATeamMember Source # | |
Defined in Wire.API.Error.Galley type MapError 'NotATeamMember = 'StaticError 403 "no-team-member" "Requesting user is not a team member" | |
type MapError 'NotConnected Source # | |
Defined in Wire.API.Error.Galley | |
type MapError 'TeamMemberNotFound Source # | |
Defined in Wire.API.Error.Galley | |
type MapError 'TeamNotFound Source # | |
Defined in Wire.API.Error.Galley | |
type MapError 'TeamSearchVisibilityNotEnabled Source # | |
Defined in Wire.API.Error.Galley type MapError 'TeamSearchVisibilityNotEnabled = 'StaticError 403 "team-search-visibility-not-enabled" "Custom search is not available for this team" | |
type MapError 'TooManyMembers Source # | |
Defined in Wire.API.Error.Galley type MapError 'TooManyMembers = 'StaticError 403 "too-many-members" "Maximum number of members per conversation reached" | |
type MapError 'TooManyTeamAdmins Source # | |
Defined in Wire.API.Error.Galley type MapError 'TooManyTeamAdmins = 'StaticError 403 "too-many-team-admins" "Maximum number of admins per team reached" | |
type MapError 'TooManyTeamMembers Source # | |
Defined in Wire.API.Error.Galley type MapError 'TooManyTeamMembers = 'StaticError 403 "too-many-team-members" "Maximum number of members per team reached" | |
type MapError 'TooManyTeamMembersOnTeamWithLegalhold Source # | |
Defined in Wire.API.Error.Galley type MapError 'TooManyTeamMembersOnTeamWithLegalhold = 'StaticError 403 "too-many-members-for-legalhold" "cannot add more members to team when legalhold service is enabled." | |
type MapError 'UserBindingExists Source # | |
Defined in Wire.API.Error.Galley type MapError 'UserBindingExists = 'StaticError 403 "binding-exists" "User already bound to a different team" | |
type MapError 'UserLegalHoldAlreadyEnabled Source # | |
Defined in Wire.API.Error.Galley type MapError 'UserLegalHoldAlreadyEnabled = 'StaticError 409 "legalhold-already-enabled" "legal hold is already enabled for this user" | |
type MapError 'UserLegalHoldIllegalOperation Source # | |
Defined in Wire.API.Error.Galley type MapError 'UserLegalHoldIllegalOperation = 'StaticError 500 "legalhold-illegal-op" "internal server error: inconsistent change of user's legalhold state" | |
type MapError 'UserLegalHoldNotPending Source # | |
Defined in Wire.API.Error.Galley type MapError 'UserLegalHoldNotPending = 'StaticError 412 "legalhold-not-pending" "legal hold cannot be approved without being in a pending state" | |
type MapError 'AddTokenErrorApnsVoipNotSupported Source # | |
Defined in Wire.API.Error.Gundeck type MapError 'AddTokenErrorApnsVoipNotSupported = 'StaticError 400 "apns-voip-not-supported" "Adding APNS_VOIP tokens is not supported" | |
type MapError 'AddTokenErrorInvalid Source # | |
Defined in Wire.API.Error.Gundeck | |
type MapError 'AddTokenErrorMetadataTooLong Source # | |
Defined in Wire.API.Error.Gundeck type MapError 'AddTokenErrorMetadataTooLong = 'StaticError 413 "metadata-too-long" "Tried to add token to endpoint resulting in metadata length > 2048" | |
type MapError 'AddTokenErrorNoBudget Source # | |
Defined in Wire.API.Error.Gundeck type MapError 'AddTokenErrorNoBudget = 'StaticError 413 "sns-thread-budget-reached" "Too many concurrent calls to SNS; is SNS down?" | |
type MapError 'AddTokenErrorNotFound Source # | |
Defined in Wire.API.Error.Gundeck | |
type MapError 'AddTokenErrorTooLong Source # | |
Defined in Wire.API.Error.Gundeck type MapError 'AddTokenErrorTooLong = 'StaticError 413 "token-too-long" "Push token length must be < 8192 for GCM or 400 for APNS" | |
type MapError 'NotificationNotFound Source # | |
Defined in Wire.API.Error.Gundeck | |
type MapError 'TokenNotFound Source # | |
Defined in Wire.API.Error.Gundeck | |
type MapError 'OAuthAuthorizationCodeNotFound Source # | |
Defined in Wire.API.OAuth type MapError 'OAuthAuthorizationCodeNotFound = 'StaticError 404 "not-found" "OAuth authorization code not found" | |
type MapError 'OAuthClientNotFound Source # | |
Defined in Wire.API.OAuth | |
type MapError 'OAuthFeatureDisabled Source # | |
Defined in Wire.API.OAuth | |
type MapError 'OAuthInvalidClientCredentials Source # | |
Defined in Wire.API.OAuth type MapError 'OAuthInvalidClientCredentials = 'StaticError 403 "forbidden" "Invalid client credentials" | |
type MapError 'OAuthInvalidGrant Source # | |
Defined in Wire.API.OAuth | |
type MapError 'OAuthInvalidGrantType Source # | |
Defined in Wire.API.OAuth | |
type MapError 'OAuthInvalidRefreshToken Source # | |
Defined in Wire.API.OAuth | |
type MapError 'OAuthJwtError Source # | |
Defined in Wire.API.OAuth type MapError 'OAuthJwtError = 'StaticError 500 "jwt-error" "Internal error while handling JWT token" | |
type MapError 'OAuthRedirectUrlMissMatch Source # | |
Defined in Wire.API.OAuth type MapError 'OAuthRedirectUrlMissMatch = 'StaticError 400 "redirect-url-miss-match" "The redirect URL does not match the one registered with the client" | |
type MapError 'OAuthUnsupportedResponseType Source # | |
Defined in Wire.API.OAuth type MapError 'OAuthUnsupportedResponseType = 'StaticError 400 "unsupported-response-type" "Unsupported response type" | |
type MapError ('ActionDenied action :: GalleyError) Source # | |
Defined in Wire.API.Error.Galley type MapError ('ActionDenied action :: GalleyError) = 'StaticError 403 "action-denied" (AppendSymbol (AppendSymbol "Insufficient authorization (missing " (ActionName action)) ")") | |
type MapError ('MissingPermission mperm :: GalleyError) Source # | |
Defined in Wire.API.Error.Galley |
errorToResponse :: forall e. KnownError (MapError e) => JSONResponse Source #
errorToWai :: forall e. KnownError (MapError e) => Error Source #
class APIError e where Source #
toResponse :: e -> JSONResponse Source #
Instances
APIError Error Source # | |
Defined in Wire.API.Error toResponse :: Error -> JSONResponse Source # | |
APIError DynError Source # | |
Defined in Wire.API.Error toResponse :: DynError -> JSONResponse Source # | |
APIError NonFederatingBackends Source # | |
Defined in Wire.API.Error.Galley | |
APIError UnreachableBackends Source # | |
Defined in Wire.API.Error.Galley | |
APIError UnreachableBackendsLegacy Source # | |
Defined in Wire.API.Error.Galley | |
KnownError (MapError e) => APIError (Tagged e ()) Source # | |
Defined in Wire.API.Error.Galley toResponse :: Tagged e () -> JSONResponse Source # |
Static errors and Servant
Instances
RoutesToPaths api => RoutesToPaths (CanThrow err :> api :: Type) Source # | |
Defined in Wire.API.Error | |
HasClient m api => HasClient m (CanThrow e :> api) Source # | |
Defined in Wire.API.Error | |
(HasOpenApi api, IsSwaggerError e) => HasOpenApi (CanThrow e :> api :: Type) Source # | |
HasServer api ctx => HasServer (CanThrow e :> api :: Type) ctx Source # | |
Defined in Wire.API.Error | |
type Client m (CanThrow e :> api) Source # | |
Defined in Wire.API.Error | |
type SpecialiseToVersion v (CanThrow e :> api) Source # | |
Defined in Wire.API.Error | |
type ServerT (CanThrow e :> api :: Type) m Source # | |
data CanThrowMany (es :: [k]) Source #
Instances
RoutesToPaths api => RoutesToPaths (CanThrowMany errs :> api :: Type) Source # | |
Defined in Wire.API.Error | |
(HasOpenApi (CanThrowMany es :> api), IsSwaggerError e) => HasOpenApi (CanThrowMany (e ': es) :> api :: Type) Source # | |
Defined in Wire.API.Error | |
HasOpenApi api => HasOpenApi (CanThrowMany ('[] :: [k]) :> api :: Type) Source # | |
Defined in Wire.API.Error | |
HasServer api ctx => HasServer (CanThrowMany es :> api :: Type) ctx Source # | |
Defined in Wire.API.Error type ServerT (CanThrowMany es :> api) m Source # route :: Proxy (CanThrowMany es :> api) -> Context ctx -> Delayed env (Server (CanThrowMany es :> api)) -> Router env Source # hoistServerWithContext :: Proxy (CanThrowMany es :> api) -> Proxy ctx -> (forall x. m x -> n x) -> ServerT (CanThrowMany es :> api) m -> ServerT (CanThrowMany es :> api) n Source # | |
type SpecialiseToVersion v (CanThrowMany es :> api) Source # | |
Defined in Wire.API.Error | |
type ServerT (CanThrowMany es :> api :: Type) m Source # | |
Defined in Wire.API.Error |
type family DeclaredErrorEffects api :: EffectRow where ... Source #
DeclaredErrorEffects (CanThrow e :> api) = ErrorEffect e ': DeclaredErrorEffects api | |
DeclaredErrorEffects (CanThrowMany (e : es) :> api) = DeclaredErrorEffects (CanThrow e :> (CanThrowMany es :> api)) | |
DeclaredErrorEffects (x :> api) = DeclaredErrorEffects api | |
DeclaredErrorEffects (Named n api) = DeclaredErrorEffects api | |
DeclaredErrorEffects api = '[] |
addStaticErrorToSwagger :: forall e. (Typeable e, KnownError e) => OpenApi -> OpenApi Source #
class IsSwaggerError e where Source #
addToOpenApi :: OpenApi -> OpenApi Source #
Instances
data ErrorResponse e Source #
Instances
Static errors and Polysemy
type family ErrorEffect (e :: k) :: Effect Source #
Instances
type ErrorEffect (e :: GalleyError) Source # | |
Defined in Wire.API.Error.Galley | |
type ErrorEffect AuthenticationError Source # | |
Defined in Wire.API.Error.Galley | |
type ErrorEffect MLSProposalFailure Source # | |
Defined in Wire.API.Error.Galley | |
type ErrorEffect NonFederatingBackends Source # | |
Defined in Wire.API.Error.Galley type ErrorEffect NonFederatingBackends = Error NonFederatingBackends :: (Type -> Type) -> Type -> Type | |
type ErrorEffect TeamFeatureError Source # | |
Defined in Wire.API.Error.Galley | |
type ErrorEffect UnreachableBackends Source # | |
Defined in Wire.API.Error.Galley | |
type ErrorEffect UnreachableBackendsLegacy Source # | |
Defined in Wire.API.Error.Galley type ErrorEffect UnreachableBackendsLegacy = Error UnreachableBackendsLegacy :: (Type -> Type) -> Type -> Type |