import { BackendError , BackendErrorLabel , StatusCode , SyntheticErrorLabel } from '../http/' ; export class TeamError extends BackendError { constructor ( message , label , code ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'ConversationError' ; } } export class InviteEmailInUseError extends TeamError { constructor ( message , label = BackendErrorLabel . INVITE_EMAIL_EXISTS , code = StatusCode . CONFLICT ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'InviteEmailInUseError' ; } } export class InvalidInvitationCodeError extends TeamError { constructor ( message , label = BackendErrorLabel . INVALID_INVITATION_CODE , code = StatusCode . BAD_REQUEST ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'InvalidInvitationCodeError' ; } } export class ServiceNotFoundError extends TeamError { constructor ( message , label = SyntheticErrorLabel . SERVICE_NOT_FOUND , code = StatusCode . NOT_FOUND ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'ServiceNotFoundError' ; } }