import { BackendError , BackendErrorLabel , StatusCode } from '../http/' ; export class ConversationError extends BackendError { constructor ( message , label , code ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'ConversationError' ; } } export class ConversationIsUnknownError extends ConversationError { constructor ( message , label = BackendErrorLabel . CLIENT_ERROR , code = StatusCode . BAD_REQUEST ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'ConversationIsUnknownError' ; } } export class ConversationOperationError extends ConversationError { constructor ( message , label = BackendErrorLabel . INVALID_OPERATION , code = StatusCode . FORBIDDEN ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'ConversationOperationError' ; } } export class ConversationLegalholdMissingConsentError extends ConversationError { constructor ( message , label = BackendErrorLabel . LEGAL_HOLD_MISSING_CONSENT , code = StatusCode . PRECONDITION_FAILED ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'ConversationLegalholdConsentNeededError' ; } } export class ConversationCodeNotFoundError extends ConversationError { constructor ( message , label = BackendErrorLabel . NO_CONVERSATION_CODE , code = StatusCode . NOT_FOUND ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'ConversationCodeNotFoundError' ; } } export class ConversationFullError extends ConversationError { constructor ( message , label = BackendErrorLabel . TOO_MANY_MEMBERS , code = StatusCode . NOT_FOUND ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'ConversationFullError' ; } }