export enum TradfriErrorCodes { ConnectionFailed , ConnectionTimedOut , AuthenticationFailed , NetworkReset } export class TradfriError extends Error { constructor ( public readonly message , public readonly code ) { super ( message ) ; Object . setPrototypeOf ( this , TradfriError . prototype ) ; } }