import { BackendError , BackendErrorLabel , StatusCode , SyntheticErrorLabel } from '../http/' ; export class UserError extends BackendError { constructor ( message , label , code ? ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'UserError' ; } } export class UserIsUnknownError extends UserError { constructor ( message , label = BackendErrorLabel . CLIENT_ERROR , code = StatusCode . BAD_REQUEST ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'UserIsUnknownError' ; } } export class UnconnectedUserError extends UserError { constructor ( message , label = BackendErrorLabel . NOT_CONNECTED , code = StatusCode . FORBIDDEN ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'UnconnectedUserError' ; } } export class RequestCancellationError extends UserError { constructor ( message , label = SyntheticErrorLabel . REQUEST_CANCELLED , code ? ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'RequestCancellationError' ; } }