export class UnsupportedProtocolException extends Error { constructor ( protocol ) { const message = `Unsupported protocol '${ protocol }.` ; super ( message ) ; } } export class BotNotConnectedException extends Error { constructor ( botId ) { const message = `Bot with id '${ botId }' is not connected.` ; super ( message ) ; } } export class BotNotFoundException extends Error { constructor ( botIdOrName , teamId ? ) { let message = `Bot with id '${ botIdOrName }' was not found.` ; if ( teamId ) { message = `Bot with name '${ botIdOrName }' in team '${ teamId }' was not found.` ; } super ( message ) ; } } export class BotResponseMalformedException extends Error { constructor ( botIdOrName ) { let message = `Bot with id '${ botIdOrName }' responded with malformed data.` ; super ( message ) ; } } export class CopyKeyNotFoundException extends Error { constructor ( copyKey ) { const message = `Bot with copy key '${ copyKey }' was not found.` ; super ( message ) ; } } export class BotIsDisabledException extends Error { constructor ( botId ) { const message = `Bot with id '${ botId }' is disabled.` ; super ( message ) ; } } export class BotAlreadyExistsException extends Error { constructor ( botName , teamId ) { const message = `Bot with name '${ botName }' is already registered in team ${ teamId }.` ; super ( message ) ; } } export class ConnectionNotAuthorizedException extends Error { constructor ( ) { const message = `Connection is not authorized.` ; super ( message ) ; } }