module Wire.API.Error.Cargohold where
import Data.Typeable
import Wire.API.Error
data CargoholdError
= AssetNotFound
| Unauthorised
| AssetTooLarge
| InvalidLength
| NoMatchingAssetEndpoint
| UnverifiedUser
| UserNotFound
instance (Typeable (MapError e), KnownError (MapError e)) => IsSwaggerError (e :: CargoholdError) where
addToOpenApi :: OpenApi -> OpenApi
addToOpenApi = forall (e :: StaticError).
(Typeable e, KnownError e) =>
OpenApi -> OpenApi
addStaticErrorToSwagger @(MapError e)
type instance MapError 'AssetNotFound = 'StaticError 404 "not-found" "Asset not found"
type instance MapError 'Unauthorised = 'StaticError 403 "unauthorised" "Unauthorised operation"
type instance MapError 'AssetTooLarge = 'StaticError 413 "client-error" "Asset too large"
type instance MapError 'InvalidLength = 'StaticError 400 "invalid-length" "Invalid content length"
type instance MapError 'UnverifiedUser = 'StaticError 403 "unverified-user" "Unverified user"
type instance MapError 'UserNotFound = 'StaticError 403 "not-found" "User not found"
type instance MapError 'NoMatchingAssetEndpoint = MapError 'AssetNotFound